Back to godoc.org
go.etcd.io/etcd / etcdserver / api / v2http / httptypes

Package httptypes

v3.1.10+incompatible
Latest Go to latest

The latest major version is .

Published: Jul 14, 2017 | License: Apache-2.0 | Module: go.etcd.io/etcd

Overview

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

Index

type HTTPError

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

func NewHTTPError

func NewHTTPError(code int, m string) *HTTPError

func (HTTPError) Error

func (e HTTPError) Error() string

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

type MemberCreateRequest struct {
	PeerURLs types.URLs
}

func (*MemberCreateRequest) UnmarshalJSON

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

type MemberUpdateRequest

type MemberUpdateRequest struct {
	MemberCreateRequest
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier