Documentation ¶
Index ¶
- Variables
- type AuthOption
- type Duration
- type MethodOpDesc
- func (*MethodOpDesc) Descriptor() ([]byte, []int)
- func (m *MethodOpDesc) GetAuth() *AuthOption
- func (m *MethodOpDesc) GetIsClientStreaming() bool
- func (m *MethodOpDesc) GetIsServerStreaming() bool
- func (m *MethodOpDesc) GetName() string
- func (m *MethodOpDesc) GetTimeout() *Duration
- func (m *MethodOpDesc) GetWebapi() *WebapiOption
- func (*MethodOpDesc) ProtoMessage()
- func (m *MethodOpDesc) Reset()
- func (m *MethodOpDesc) String() string
- type ServiceOpDesc
- func (*ServiceOpDesc) Descriptor() ([]byte, []int)
- func (m *ServiceOpDesc) GetMethods() []*MethodOpDesc
- func (m *ServiceOpDesc) GetName() string
- func (m *ServiceOpDesc) GetOption() *ServiceOption
- func (*ServiceOpDesc) ProtoMessage()
- func (m *ServiceOpDesc) Reset()
- func (m *ServiceOpDesc) String() string
- type ServiceOption
- type WebapiOption
Constants ¶
This section is empty.
Variables ¶
View Source
var E_Auth = &proto.ExtensionDesc{ ExtendedType: (*descriptorpb.MethodOptions)(nil), ExtensionType: (*AuthOption)(nil), Field: 711846, Name: "common.auth", Tag: "bytes,711846,opt,name=auth", Filename: "common/proto/serviceOptions.proto", }
View Source
var E_Service = &proto.ExtensionDesc{ ExtendedType: (*descriptorpb.ServiceOptions)(nil), ExtensionType: (*ServiceOption)(nil), Field: 711845, Name: "common.service", Tag: "bytes,711845,opt,name=service", Filename: "common/proto/serviceOptions.proto", }
View Source
var E_Timeout = &proto.ExtensionDesc{ ExtendedType: (*descriptorpb.MethodOptions)(nil), ExtensionType: (*string)(nil), Field: 711847, Name: "common.timeout", Tag: "bytes,711847,opt,name=timeout", Filename: "common/proto/serviceOptions.proto", }
View Source
var E_Webapi = &proto.ExtensionDesc{ ExtendedType: (*descriptorpb.MethodOptions)(nil), ExtensionType: (*WebapiOption)(nil), Field: 711845, Name: "common.webapi", Tag: "bytes,711845,opt,name=webapi", Filename: "common/proto/serviceOptions.proto", }
Functions ¶
This section is empty.
Types ¶
type AuthOption ¶
type AuthOption struct { // 是否需要登陆 User bool `protobuf:"varint,1,opt,name=user,proto3" json:"user,omitempty"` // 是否需要管理员权限 Admin bool `protobuf:"varint,2,opt,name=admin,proto3" json:"admin,omitempty"` }
func (*AuthOption) Descriptor ¶
func (*AuthOption) Descriptor() ([]byte, []int)
func (*AuthOption) GetAdmin ¶
func (m *AuthOption) GetAdmin() bool
func (*AuthOption) GetUser ¶
func (m *AuthOption) GetUser() bool
func (*AuthOption) ProtoMessage ¶
func (*AuthOption) ProtoMessage()
func (*AuthOption) Reset ¶
func (m *AuthOption) Reset()
func (*AuthOption) String ¶
func (m *AuthOption) String() string
type Duration ¶
type Duration struct {
Nanos int64 `protobuf:"varint,1,opt,name=nanos,proto3" json:"nanos,omitempty"`
}
func (*Duration) Descriptor ¶
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
type MethodOpDesc ¶
type MethodOpDesc struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Webapi *WebapiOption `protobuf:"bytes,2,opt,name=webapi,proto3" json:"webapi,omitempty"` Auth *AuthOption `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` Timeout *Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` IsClientStreaming bool `protobuf:"varint,5,opt,name=isClientStreaming,proto3" json:"isClientStreaming,omitempty"` IsServerStreaming bool `protobuf:"varint,6,opt,name=isServerStreaming,proto3" json:"isServerStreaming,omitempty"` }
func (*MethodOpDesc) Descriptor ¶
func (*MethodOpDesc) Descriptor() ([]byte, []int)
func (*MethodOpDesc) GetAuth ¶
func (m *MethodOpDesc) GetAuth() *AuthOption
func (*MethodOpDesc) GetIsClientStreaming ¶
func (m *MethodOpDesc) GetIsClientStreaming() bool
func (*MethodOpDesc) GetIsServerStreaming ¶
func (m *MethodOpDesc) GetIsServerStreaming() bool
func (*MethodOpDesc) GetName ¶
func (m *MethodOpDesc) GetName() string
func (*MethodOpDesc) GetTimeout ¶
func (m *MethodOpDesc) GetTimeout() *Duration
func (*MethodOpDesc) GetWebapi ¶
func (m *MethodOpDesc) GetWebapi() *WebapiOption
func (*MethodOpDesc) ProtoMessage ¶
func (*MethodOpDesc) ProtoMessage()
func (*MethodOpDesc) Reset ¶
func (m *MethodOpDesc) Reset()
func (*MethodOpDesc) String ¶
func (m *MethodOpDesc) String() string
type ServiceOpDesc ¶
type ServiceOpDesc struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Option *ServiceOption `protobuf:"bytes,2,opt,name=option,proto3" json:"option,omitempty"` Methods []*MethodOpDesc `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"` }
func GenOption ¶
func GenOption(s []byte) *ServiceOpDesc
func (*ServiceOpDesc) Descriptor ¶
func (*ServiceOpDesc) Descriptor() ([]byte, []int)
func (*ServiceOpDesc) GetMethods ¶
func (m *ServiceOpDesc) GetMethods() []*MethodOpDesc
func (*ServiceOpDesc) GetName ¶
func (m *ServiceOpDesc) GetName() string
func (*ServiceOpDesc) GetOption ¶
func (m *ServiceOpDesc) GetOption() *ServiceOption
func (*ServiceOpDesc) ProtoMessage ¶
func (*ServiceOpDesc) ProtoMessage()
func (*ServiceOpDesc) Reset ¶
func (m *ServiceOpDesc) Reset()
func (*ServiceOpDesc) String ¶
func (m *ServiceOpDesc) String() string
type ServiceOption ¶
type ServiceOption struct { // 全局开启 webapi Webapi bool `protobuf:"varint,1,opt,name=webapi,proto3" json:"webapi,omitempty"` }
func (*ServiceOption) Descriptor ¶
func (*ServiceOption) Descriptor() ([]byte, []int)
func (*ServiceOption) GetWebapi ¶
func (m *ServiceOption) GetWebapi() bool
func (*ServiceOption) ProtoMessage ¶
func (*ServiceOption) ProtoMessage()
func (*ServiceOption) Reset ¶
func (m *ServiceOption) Reset()
func (*ServiceOption) String ¶
func (m *ServiceOption) String() string
type WebapiOption ¶
type WebapiOption struct { // 该方法是否支持webapi Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` // 使用multipart上传文件 Upload bool `protobuf:"varint,2,opt,name=upload,proto3" json:"upload,omitempty"` // 是否禁止该方法在webapi中显示 Disable bool `protobuf:"varint,3,opt,name=disable,proto3" json:"disable,omitempty"` }
func (*WebapiOption) Descriptor ¶
func (*WebapiOption) Descriptor() ([]byte, []int)
func (*WebapiOption) GetDisable ¶
func (m *WebapiOption) GetDisable() bool
func (*WebapiOption) GetEnable ¶
func (m *WebapiOption) GetEnable() bool
func (*WebapiOption) GetUpload ¶
func (m *WebapiOption) GetUpload() bool
func (*WebapiOption) ProtoMessage ¶
func (*WebapiOption) ProtoMessage()
func (*WebapiOption) Reset ¶
func (m *WebapiOption) Reset()
func (*WebapiOption) String ¶
func (m *WebapiOption) String() string
Click to show internal directories.
Click to hide internal directories.