api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

api.proto

It has these top-level messages:

Error
ErrorResponse

Index

Constants

This section is empty.

Variables

View Source
var ErrorCode_name = map[int32]string{
	500: "internal_server_error",
	400: "bad_request",
	401: "not_authorized",
	403: "forbidden",
	404: "not_found",
}
View Source
var ErrorCode_value = map[string]int32{
	"internal_server_error": 500,
	"bad_request":           400,
	"not_authorized":        401,
	"forbidden":             403,
	"not_found":             404,
}

Functions

This section is empty.

Types

type Error

type Error struct {
	Code             *int32     `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
	Title            *ErrorCode `protobuf:"varint,2,opt,name=title,enum=nagax.router.api.ErrorCode" json:"title,omitempty"`
	Detail           *string    `protobuf:"bytes,3,opt,name=detail" json:"detail,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

func (*Error) GetCode

func (m *Error) GetCode() int32

func (*Error) GetDetail

func (m *Error) GetDetail() string

func (*Error) GetTitle

func (m *Error) GetTitle() ErrorCode

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) SetCode

func (m *Error) SetCode(v *int32)

func (*Error) SetDetail

func (m *Error) SetDetail(v *string)

func (*Error) SetTitle

func (m *Error) SetTitle(v *ErrorCode)

func (*Error) String

func (m *Error) String() string

type ErrorCode

type ErrorCode int32
const (
	ErrorCode_internal_server_error ErrorCode = 500
	ErrorCode_bad_request           ErrorCode = 400
	ErrorCode_not_authorized        ErrorCode = 401
	ErrorCode_forbidden             ErrorCode = 403
	ErrorCode_not_found             ErrorCode = 404
)

func (ErrorCode) Enum

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor

func (ErrorCode) EnumDescriptor() ([]byte, []int)

func (ErrorCode) String

func (x ErrorCode) String() string

func (*ErrorCode) UnmarshalJSON

func (x *ErrorCode) UnmarshalJSON(data []byte) error

type ErrorResponse

type ErrorResponse struct {
	Errors           []*Error `protobuf:"bytes,1,rep,name=errors" json:"errors,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*ErrorResponse) Descriptor

func (*ErrorResponse) Descriptor() ([]byte, []int)

func (*ErrorResponse) GetErrors

func (m *ErrorResponse) GetErrors() []*Error

func (*ErrorResponse) ProtoMessage

func (*ErrorResponse) ProtoMessage()

func (*ErrorResponse) Reset

func (m *ErrorResponse) Reset()

func (*ErrorResponse) SetErrors

func (m *ErrorResponse) SetErrors(v []*Error)

func (*ErrorResponse) String

func (m *ErrorResponse) String() string

Jump to

Keyboard shortcuts

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