message

package
v0.0.0-...-608e6a2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_trellis_tech_trellis_v1_proto_message_proto protoreflect.FileDescriptor

Functions

func NewRequest

func NewRequest()

Types

type Option

type Option func(*Options)

func Code

func Code(code int64) Option

func Error

func Error(err error) Option

type Options

type Options struct {
	Code int64
	Err  error
}

type Payload

type Payload struct {
	Header map[string]string `` /* 153-byte string literal not displayed */
	Body   []byte            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload) ContentType

func (x *Payload) ContentType() string

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) Get

func (x *Payload) Get(k string) string

func (*Payload) GetBody

func (x *Payload) GetBody() []byte

func (*Payload) GetHeader

func (x *Payload) GetHeader() map[string]string

func (*Payload) GetTraceInfo

func (x *Payload) GetTraceInfo() (*mime.TraceInfo, error)

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) Set

func (x *Payload) Set(k, v string)

func (*Payload) SetBody

func (x *Payload) SetBody(model interface{}) error

func (*Payload) String

func (x *Payload) String() string

func (*Payload) ToObject

func (x *Payload) ToObject(model interface{}) error

type Request

type Request struct {
	Service *service.Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// Request payload
	Payload *Payload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetPayload

func (x *Request) GetPayload() *Payload

func (*Request) GetService

func (x *Request) GetService() *service.Service

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {

	// @gotags: json:"code"
	Code int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// Response payload @gotags: json:"payload"
	Payload *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload"`
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(data interface{}, opts ...Option) *Response

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode

func (x *Response) GetCode() int64

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) GetPayload

func (x *Response) GetPayload() *Payload

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) SetPayload

func (m *Response) SetPayload(payload *Payload)

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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