endpoints

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

func Deploy

func Deploy(w http.ResponseWriter, r *http.Request)

func ErrorAuthAPIError

func ErrorAuthAPIError() error

func ErrorAuthForbidden

func ErrorAuthForbidden() error

func ErrorAuthHeaderMalformed

func ErrorAuthHeaderMalformed() error

func ErrorAuthHeaderMissing

func ErrorAuthHeaderMissing() error

func GetAggregate

func GetAggregate(w http.ResponseWriter, r *http.Request)

func GetResources

func GetResources(w http.ResponseWriter, r *http.Request)

func ReadLogs

func ReadLogs(w http.ResponseWriter, r *http.Request)

func RecoverAndRespond

func RecoverAndRespond(w http.ResponseWriter, strs ...string)

func Respond

func Respond(w http.ResponseWriter, response interface{})

func RespondError

func RespondError(w http.ResponseWriter, err error, strs ...string)

func RespondErrorCode

func RespondErrorCode(w http.ResponseWriter, code int, err error, strs ...string)

func RespondIfError

func RespondIfError(w http.ResponseWriter, err error, strs ...string) bool

Types

type EndpointsError

type EndpointsError struct {
	Kind ErrorKind
	// contains filtered or unexported fields
}

func (EndpointsError) Error

func (e EndpointsError) Error() string

type ErrorKind

type ErrorKind int
const (
	ErrUnknown ErrorKind = iota
	ErrAuthHeaderMissing
	ErrAuthHeaderMalformed
	ErrAuthAPIError
	ErrAuthForbidden
)

func (ErrorKind) MarshalBinary

func (t ErrorKind) MarshalBinary() ([]byte, error)

MarshalBinary satisfies BinaryMarshaler

func (ErrorKind) MarshalText

func (t ErrorKind) MarshalText() ([]byte, error)

MarshalText satisfies TextMarshaler

func (ErrorKind) String

func (t ErrorKind) String() string

func (*ErrorKind) UnmarshalBinary

func (t *ErrorKind) UnmarshalBinary(data []byte) error

UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack

func (*ErrorKind) UnmarshalText

func (t *ErrorKind) UnmarshalText(text []byte) error

UnmarshalText satisfies TextUnmarshaler

Jump to

Keyboard shortcuts

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