httptypes

package
v3.0.0-beta.0.0...-d017814 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL