etcd: Index | Files

package httptypes

import ""

Package httptypes defines how etcd's HTTP API entities are serialized to and deserialized from JSON.


Package Files

errors.go member.go

type HTTPError Uses

type HTTPError struct {
    Message string `json:"message"`
    // Code is the HTTP status code
    Code int `json:"-"`

func NewHTTPError Uses

func NewHTTPError(code int, m string) *HTTPError

func (HTTPError) Error Uses

func (e HTTPError) Error() string

func (HTTPError) WriteTo Uses

func (e HTTPError) WriteTo(w http.ResponseWriter) error

type Member Uses

type Member struct {
    ID         string   `json:"id"`
    Name       string   `json:"name"`
    PeerURLs   []string `json:"peerURLs"`
    ClientURLs []string `json:"clientURLs"`

type MemberCollection Uses

type MemberCollection []Member

func (*MemberCollection) MarshalJSON Uses

func (c *MemberCollection) MarshalJSON() ([]byte, error)

type MemberCreateRequest Uses

type MemberCreateRequest struct {
    PeerURLs types.URLs

func (*MemberCreateRequest) UnmarshalJSON Uses

func (m *MemberCreateRequest) UnmarshalJSON(data []byte) error

type MemberUpdateRequest Uses

type MemberUpdateRequest struct {

Package httptypes imports 4 packages (graph) and is imported by 75 packages. Updated 2020-05-21. Refresh now. Tools for package owners.