package httptypes
import "github.com/etcd-io/etcd/etcdserver/etcdhttp/httptypes"
Package httptypes defines how etcd's HTTP API entities are serialized to and deserialized from JSON.
Index ¶
- type HTTPError
- func NewHTTPError(code int, m string) *HTTPError
- func (e HTTPError) Error() string
- func (e HTTPError) WriteTo(w http.ResponseWriter) error
- type Member
- type MemberCollection
- type MemberCreateRequest
- type MemberUpdateRequest
Types ¶
type HTTPError ¶
type HTTPError struct { Message string `json:"message"` // Code is the HTTP status code Code int `json:"-"` }
func NewHTTPError ¶
func (HTTPError) Error ¶
func (HTTPError) WriteTo ¶
func (e HTTPError) WriteTo(w http.ResponseWriter) error
type Member ¶
type Member struct { ID string `json:"id"` Name string `json:"name"` PeerURLs []string `json:"peerURLs"` ClientURLs []string `json:"clientURLs"` }
type MemberCollection ¶
type MemberCollection []Member
func (*MemberCollection) MarshalJSON ¶
func (c *MemberCollection) MarshalJSON() ([]byte, error)
type MemberCreateRequest ¶
func (*MemberCreateRequest) UnmarshalJSON ¶
func (m *MemberCreateRequest) UnmarshalJSON(data []byte) error
type MemberUpdateRequest ¶
type MemberUpdateRequest struct { MemberCreateRequest }
Source Files ¶
- Version
- v2.3.8+incompatible (latest)
- Published
- Feb 16, 2017
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 weeks ago –
Tools for package owners.