Documentation
¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountClient) error
- func RegisterAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServer) error
- func RegisterAccountServer(s *grpc.Server, srv AccountServer)
- func RegisterPermissionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPermissionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionClient) error
- func RegisterPermissionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPermissionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServer) error
- func RegisterPermissionServer(s *grpc.Server, srv PermissionServer)
- type AccountClient
- type AccountServer
- type GetCurrentRequest
- func (*GetCurrentRequest) Descriptor() ([]byte, []int)
- func (*GetCurrentRequest) ProtoMessage()
- func (m *GetCurrentRequest) Reset()
- func (m *GetCurrentRequest) String() string
- func (m *GetCurrentRequest) XXX_DiscardUnknown()
- func (m *GetCurrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetCurrentRequest) XXX_Merge(src proto.Message)
- func (m *GetCurrentRequest) XXX_Size() int
- func (m *GetCurrentRequest) XXX_Unmarshal(b []byte) error
- type GetCurrentResponse
- func (*GetCurrentResponse) Descriptor() ([]byte, []int)
- func (m *GetCurrentResponse) GetErr() *errors.BusinessError
- func (m *GetCurrentResponse) GetUser() *User
- func (m *GetCurrentResponse) GetUserInfo() *UserInfo
- func (*GetCurrentResponse) ProtoMessage()
- func (m *GetCurrentResponse) Reset()
- func (m *GetCurrentResponse) String() string
- func (m *GetCurrentResponse) XXX_DiscardUnknown()
- func (m *GetCurrentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetCurrentResponse) XXX_Merge(src proto.Message)
- func (m *GetCurrentResponse) XXX_Size() int
- func (m *GetCurrentResponse) XXX_Unmarshal(b []byte) error
- type GetUserInfoRequest
- func (*GetUserInfoRequest) Descriptor() ([]byte, []int)
- func (m *GetUserInfoRequest) GetOpenId() string
- func (*GetUserInfoRequest) ProtoMessage()
- func (m *GetUserInfoRequest) Reset()
- func (m *GetUserInfoRequest) String() string
- func (m *GetUserInfoRequest) XXX_DiscardUnknown()
- func (m *GetUserInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetUserInfoRequest) XXX_Merge(src proto.Message)
- func (m *GetUserInfoRequest) XXX_Size() int
- func (m *GetUserInfoRequest) XXX_Unmarshal(b []byte) error
- type OAuth2Client
- func (*OAuth2Client) Descriptor() ([]byte, []int)
- func (m *OAuth2Client) GetId() string
- func (m *OAuth2Client) GetSecret() string
- func (*OAuth2Client) ProtoMessage()
- func (m *OAuth2Client) Reset()
- func (m *OAuth2Client) String() string
- func (m *OAuth2Client) XXX_DiscardUnknown()
- func (m *OAuth2Client) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *OAuth2Client) XXX_Merge(src proto.Message)
- func (m *OAuth2Client) XXX_Size() int
- func (m *OAuth2Client) XXX_Unmarshal(b []byte) error
- type PermissionClient
- type PermissionServer
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetCreatedAt() int64
- func (m *User) GetDeletedAt() int64
- func (m *User) GetId() string
- func (m *User) GetUpdatedAt() int64
- func (m *User) GetUsername() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)
- func (m *UserInfo) GetAvatarUrl() string
- func (m *UserInfo) GetGender() uint32
- func (m *UserInfo) GetNickName() string
- func (*UserInfo) ProtoMessage()
- func (m *UserInfo) Reset()
- func (m *UserInfo) String() string
- func (m *UserInfo) XXX_DiscardUnknown()
- func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserInfo) XXX_Merge(src proto.Message)
- func (m *UserInfo) XXX_Size() int
- func (m *UserInfo) XXX_Unmarshal(b []byte) error
- type VerificationHttpRouterRequest
- func (*VerificationHttpRouterRequest) Descriptor() ([]byte, []int)
- func (m *VerificationHttpRouterRequest) GetClient() *OAuth2Client
- func (m *VerificationHttpRouterRequest) GetMethod() string
- func (m *VerificationHttpRouterRequest) GetReturnUserInfo() bool
- func (m *VerificationHttpRouterRequest) GetRouter() string
- func (m *VerificationHttpRouterRequest) GetToken() string
- func (*VerificationHttpRouterRequest) ProtoMessage()
- func (m *VerificationHttpRouterRequest) Reset()
- func (m *VerificationHttpRouterRequest) String() string
- func (m *VerificationHttpRouterRequest) XXX_DiscardUnknown()
- func (m *VerificationHttpRouterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationHttpRouterRequest) XXX_Merge(src proto.Message)
- func (m *VerificationHttpRouterRequest) XXX_Size() int
- func (m *VerificationHttpRouterRequest) XXX_Unmarshal(b []byte) error
- type VerificationHttpRouterResponse
- func (*VerificationHttpRouterResponse) Descriptor() ([]byte, []int)
- func (m *VerificationHttpRouterResponse) GetAllow() bool
- func (m *VerificationHttpRouterResponse) GetErr() *errors.BusinessError
- func (m *VerificationHttpRouterResponse) GetUserInfo() *VerificationHttpRouterResponse_UserInfo
- func (*VerificationHttpRouterResponse) ProtoMessage()
- func (m *VerificationHttpRouterResponse) Reset()
- func (m *VerificationHttpRouterResponse) String() string
- func (m *VerificationHttpRouterResponse) XXX_DiscardUnknown()
- func (m *VerificationHttpRouterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationHttpRouterResponse) XXX_Merge(src proto.Message)
- func (m *VerificationHttpRouterResponse) XXX_Size() int
- func (m *VerificationHttpRouterResponse) XXX_Unmarshal(b []byte) error
- type VerificationHttpRouterResponse_UserInfo
- func (*VerificationHttpRouterResponse_UserInfo) Descriptor() ([]byte, []int)
- func (m *VerificationHttpRouterResponse_UserInfo) GetAvatarUrl() string
- func (m *VerificationHttpRouterResponse_UserInfo) GetGender() uint32
- func (m *VerificationHttpRouterResponse_UserInfo) GetNickName() string
- func (m *VerificationHttpRouterResponse_UserInfo) GetOpenId() string
- func (m *VerificationHttpRouterResponse_UserInfo) GetUsername() string
- func (*VerificationHttpRouterResponse_UserInfo) ProtoMessage()
- func (m *VerificationHttpRouterResponse_UserInfo) Reset()
- func (m *VerificationHttpRouterResponse_UserInfo) String() string
- func (m *VerificationHttpRouterResponse_UserInfo) XXX_DiscardUnknown()
- func (m *VerificationHttpRouterResponse_UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationHttpRouterResponse_UserInfo) XXX_Merge(src proto.Message)
- func (m *VerificationHttpRouterResponse_UserInfo) XXX_Size() int
- func (m *VerificationHttpRouterResponse_UserInfo) XXX_Unmarshal(b []byte) error
- type VerificationTokenRequest
- func (*VerificationTokenRequest) Descriptor() ([]byte, []int)
- func (m *VerificationTokenRequest) GetClient() *OAuth2Client
- func (m *VerificationTokenRequest) GetReturnUserInfo() bool
- func (m *VerificationTokenRequest) GetToken() string
- func (*VerificationTokenRequest) ProtoMessage()
- func (m *VerificationTokenRequest) Reset()
- func (m *VerificationTokenRequest) String() string
- func (m *VerificationTokenRequest) XXX_DiscardUnknown()
- func (m *VerificationTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationTokenRequest) XXX_Merge(src proto.Message)
- func (m *VerificationTokenRequest) XXX_Size() int
- func (m *VerificationTokenRequest) XXX_Unmarshal(b []byte) error
- type VerificationTokenResponse
- func (*VerificationTokenResponse) Descriptor() ([]byte, []int)
- func (m *VerificationTokenResponse) GetAllow() bool
- func (m *VerificationTokenResponse) GetErr() *errors.BusinessError
- func (m *VerificationTokenResponse) GetUserInfo() *VerificationTokenResponse_UserInfo
- func (*VerificationTokenResponse) ProtoMessage()
- func (m *VerificationTokenResponse) Reset()
- func (m *VerificationTokenResponse) String() string
- func (m *VerificationTokenResponse) XXX_DiscardUnknown()
- func (m *VerificationTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationTokenResponse) XXX_Merge(src proto.Message)
- func (m *VerificationTokenResponse) XXX_Size() int
- func (m *VerificationTokenResponse) XXX_Unmarshal(b []byte) error
- type VerificationTokenResponse_UserInfo
- func (*VerificationTokenResponse_UserInfo) Descriptor() ([]byte, []int)
- func (m *VerificationTokenResponse_UserInfo) GetAvatarUrl() string
- func (m *VerificationTokenResponse_UserInfo) GetGender() uint32
- func (m *VerificationTokenResponse_UserInfo) GetNickName() string
- func (m *VerificationTokenResponse_UserInfo) GetOpenId() string
- func (m *VerificationTokenResponse_UserInfo) GetUsername() string
- func (*VerificationTokenResponse_UserInfo) ProtoMessage()
- func (m *VerificationTokenResponse_UserInfo) Reset()
- func (m *VerificationTokenResponse_UserInfo) String() string
- func (m *VerificationTokenResponse_UserInfo) XXX_DiscardUnknown()
- func (m *VerificationTokenResponse_UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerificationTokenResponse_UserInfo) XXX_Merge(src proto.Message)
- func (m *VerificationTokenResponse_UserInfo) XXX_Size() int
- func (m *VerificationTokenResponse_UserInfo) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccountHandler ¶
func RegisterAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAccountHandler registers the http handlers for service Account to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAccountHandlerClient ¶
func RegisterAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountClient) error
RegisterAccountHandlerClient registers the http handlers for service Account to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccountClient" to call the correct interceptors.
func RegisterAccountHandlerFromEndpoint ¶
func RegisterAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAccountHandlerFromEndpoint is same as RegisterAccountHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAccountHandlerServer ¶
func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServer) error
RegisterAccountHandlerServer registers the http handlers for service Account to "mux". UnaryRPC :call AccountServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterAccountServer ¶
func RegisterAccountServer(s *grpc.Server, srv AccountServer)
func RegisterPermissionHandler ¶ added in v0.1.2
func RegisterPermissionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPermissionHandler registers the http handlers for service Permission to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPermissionHandlerClient ¶ added in v0.1.2
func RegisterPermissionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionClient) error
RegisterPermissionHandlerClient registers the http handlers for service Permission to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PermissionClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PermissionClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PermissionClient" to call the correct interceptors.
func RegisterPermissionHandlerFromEndpoint ¶ added in v0.1.2
func RegisterPermissionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPermissionHandlerFromEndpoint is same as RegisterPermissionHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPermissionHandlerServer ¶ added in v0.1.2
func RegisterPermissionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServer) error
RegisterPermissionHandlerServer registers the http handlers for service Permission to "mux". UnaryRPC :call PermissionServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterPermissionServer ¶ added in v0.1.2
func RegisterPermissionServer(s *grpc.Server, srv PermissionServer)
Types ¶
type AccountClient ¶
type AccountClient interface { GetCurrent(ctx context.Context, in *GetCurrentRequest, opts ...grpc.CallOption) (*GetCurrentResponse, error) GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetCurrentResponse, error) }
AccountClient is the client API for Account service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAccountClient ¶
func NewAccountClient(cc *grpc.ClientConn) AccountClient
type AccountServer ¶
type AccountServer interface { GetCurrent(context.Context, *GetCurrentRequest) (*GetCurrentResponse, error) GetUserInfo(context.Context, *GetUserInfoRequest) (*GetCurrentResponse, error) }
AccountServer is the server API for Account service.
type GetCurrentRequest ¶
type GetCurrentRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetCurrentRequest) Descriptor ¶
func (*GetCurrentRequest) Descriptor() ([]byte, []int)
func (*GetCurrentRequest) ProtoMessage ¶
func (*GetCurrentRequest) ProtoMessage()
func (*GetCurrentRequest) Reset ¶
func (m *GetCurrentRequest) Reset()
func (*GetCurrentRequest) String ¶
func (m *GetCurrentRequest) String() string
func (*GetCurrentRequest) XXX_DiscardUnknown ¶
func (m *GetCurrentRequest) XXX_DiscardUnknown()
func (*GetCurrentRequest) XXX_Marshal ¶
func (m *GetCurrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetCurrentRequest) XXX_Merge ¶
func (dst *GetCurrentRequest) XXX_Merge(src proto.Message)
func (*GetCurrentRequest) XXX_Size ¶
func (m *GetCurrentRequest) XXX_Size() int
func (*GetCurrentRequest) XXX_Unmarshal ¶
func (m *GetCurrentRequest) XXX_Unmarshal(b []byte) error
type GetCurrentResponse ¶
type GetCurrentResponse struct { Err *errors.BusinessError `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` UserInfo *UserInfo `protobuf:"bytes,3,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetCurrentResponse) Descriptor ¶
func (*GetCurrentResponse) Descriptor() ([]byte, []int)
func (*GetCurrentResponse) GetErr ¶
func (m *GetCurrentResponse) GetErr() *errors.BusinessError
func (*GetCurrentResponse) GetUser ¶ added in v0.1.0
func (m *GetCurrentResponse) GetUser() *User
func (*GetCurrentResponse) GetUserInfo ¶ added in v0.1.0
func (m *GetCurrentResponse) GetUserInfo() *UserInfo
func (*GetCurrentResponse) ProtoMessage ¶
func (*GetCurrentResponse) ProtoMessage()
func (*GetCurrentResponse) Reset ¶
func (m *GetCurrentResponse) Reset()
func (*GetCurrentResponse) String ¶
func (m *GetCurrentResponse) String() string
func (*GetCurrentResponse) XXX_DiscardUnknown ¶
func (m *GetCurrentResponse) XXX_DiscardUnknown()
func (*GetCurrentResponse) XXX_Marshal ¶
func (m *GetCurrentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetCurrentResponse) XXX_Merge ¶
func (dst *GetCurrentResponse) XXX_Merge(src proto.Message)
func (*GetCurrentResponse) XXX_Size ¶
func (m *GetCurrentResponse) XXX_Size() int
func (*GetCurrentResponse) XXX_Unmarshal ¶
func (m *GetCurrentResponse) XXX_Unmarshal(b []byte) error
type GetUserInfoRequest ¶ added in v0.0.2
type GetUserInfoRequest struct { OpenId string `protobuf:"bytes,1,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserInfoRequest) Descriptor ¶ added in v0.0.2
func (*GetUserInfoRequest) Descriptor() ([]byte, []int)
func (*GetUserInfoRequest) GetOpenId ¶ added in v0.0.2
func (m *GetUserInfoRequest) GetOpenId() string
func (*GetUserInfoRequest) ProtoMessage ¶ added in v0.0.2
func (*GetUserInfoRequest) ProtoMessage()
func (*GetUserInfoRequest) Reset ¶ added in v0.0.2
func (m *GetUserInfoRequest) Reset()
func (*GetUserInfoRequest) String ¶ added in v0.0.2
func (m *GetUserInfoRequest) String() string
func (*GetUserInfoRequest) XXX_DiscardUnknown ¶ added in v0.0.2
func (m *GetUserInfoRequest) XXX_DiscardUnknown()
func (*GetUserInfoRequest) XXX_Marshal ¶ added in v0.0.2
func (m *GetUserInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserInfoRequest) XXX_Merge ¶ added in v0.0.2
func (dst *GetUserInfoRequest) XXX_Merge(src proto.Message)
func (*GetUserInfoRequest) XXX_Size ¶ added in v0.0.2
func (m *GetUserInfoRequest) XXX_Size() int
func (*GetUserInfoRequest) XXX_Unmarshal ¶ added in v0.0.2
func (m *GetUserInfoRequest) XXX_Unmarshal(b []byte) error
type OAuth2Client ¶ added in v0.2.0
type OAuth2Client struct { // 客户端ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*OAuth2Client) Descriptor ¶ added in v0.2.0
func (*OAuth2Client) Descriptor() ([]byte, []int)
func (*OAuth2Client) GetId ¶ added in v0.2.0
func (m *OAuth2Client) GetId() string
func (*OAuth2Client) GetSecret ¶ added in v0.2.0
func (m *OAuth2Client) GetSecret() string
func (*OAuth2Client) ProtoMessage ¶ added in v0.2.0
func (*OAuth2Client) ProtoMessage()
func (*OAuth2Client) Reset ¶ added in v0.2.0
func (m *OAuth2Client) Reset()
func (*OAuth2Client) String ¶ added in v0.2.0
func (m *OAuth2Client) String() string
func (*OAuth2Client) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *OAuth2Client) XXX_DiscardUnknown()
func (*OAuth2Client) XXX_Marshal ¶ added in v0.2.0
func (m *OAuth2Client) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OAuth2Client) XXX_Merge ¶ added in v0.2.0
func (dst *OAuth2Client) XXX_Merge(src proto.Message)
func (*OAuth2Client) XXX_Size ¶ added in v0.2.0
func (m *OAuth2Client) XXX_Size() int
func (*OAuth2Client) XXX_Unmarshal ¶ added in v0.2.0
func (m *OAuth2Client) XXX_Unmarshal(b []byte) error
type PermissionClient ¶ added in v0.1.2
type PermissionClient interface { // VerificationToken 验证Token VerificationToken(ctx context.Context, in *VerificationTokenRequest, opts ...grpc.CallOption) (*VerificationTokenResponse, error) // VerificationHttpRouter 验证Http路由权限 VerificationHttpRouter(ctx context.Context, in *VerificationHttpRouterRequest, opts ...grpc.CallOption) (*VerificationHttpRouterResponse, error) }
PermissionClient is the client API for Permission service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPermissionClient ¶ added in v0.1.2
func NewPermissionClient(cc *grpc.ClientConn) PermissionClient
type PermissionServer ¶ added in v0.1.2
type PermissionServer interface { // VerificationToken 验证Token VerificationToken(context.Context, *VerificationTokenRequest) (*VerificationTokenResponse, error) // VerificationHttpRouter 验证Http路由权限 VerificationHttpRouter(context.Context, *VerificationHttpRouterRequest) (*VerificationHttpRouterResponse, error) }
PermissionServer is the server API for Permission service.
type User ¶ added in v0.1.0
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` DeletedAt int64 `protobuf:"varint,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶ added in v0.1.0
func (*User) GetCreatedAt ¶ added in v0.1.0
func (*User) GetDeletedAt ¶ added in v0.1.0
func (*User) GetUpdatedAt ¶ added in v0.1.0
func (*User) GetUsername ¶ added in v0.1.0
func (*User) ProtoMessage ¶ added in v0.1.0
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶ added in v0.1.0
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Marshal ¶ added in v0.1.0
func (*User) XXX_Unmarshal ¶ added in v0.1.0
type UserInfo ¶ added in v0.1.0
type UserInfo struct { NickName string `protobuf:"bytes,1,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` AvatarUrl string `protobuf:"bytes,2,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` Gender uint32 `protobuf:"varint,3,opt,name=gender,proto3" json:"gender,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserInfo) Descriptor ¶ added in v0.1.0
func (*UserInfo) GetAvatarUrl ¶ added in v0.1.0
func (*UserInfo) GetNickName ¶ added in v0.1.0
func (*UserInfo) ProtoMessage ¶ added in v0.1.0
func (*UserInfo) ProtoMessage()
func (*UserInfo) XXX_DiscardUnknown ¶ added in v0.1.0
func (m *UserInfo) XXX_DiscardUnknown()
func (*UserInfo) XXX_Marshal ¶ added in v0.1.0
func (*UserInfo) XXX_Unmarshal ¶ added in v0.1.0
type VerificationHttpRouterRequest ¶ added in v0.1.2
type VerificationHttpRouterRequest struct { // 客户端 Client *OAuth2Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` // token Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // 路由 Router string `protobuf:"bytes,3,opt,name=router,proto3" json:"router,omitempty"` // 请求方法 Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` // 是否返回用户信息,token验证通过的情况下 ReturnUserInfo bool `protobuf:"varint,5,opt,name=return_user_info,json=returnUserInfo,proto3" json:"return_user_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerificationHttpRouterRequest 验证HTTP路由权限请求参数
func (*VerificationHttpRouterRequest) Descriptor ¶ added in v0.1.2
func (*VerificationHttpRouterRequest) Descriptor() ([]byte, []int)
func (*VerificationHttpRouterRequest) GetClient ¶ added in v0.2.0
func (m *VerificationHttpRouterRequest) GetClient() *OAuth2Client
func (*VerificationHttpRouterRequest) GetMethod ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) GetMethod() string
func (*VerificationHttpRouterRequest) GetReturnUserInfo ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) GetReturnUserInfo() bool
func (*VerificationHttpRouterRequest) GetRouter ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) GetRouter() string
func (*VerificationHttpRouterRequest) GetToken ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) GetToken() string
func (*VerificationHttpRouterRequest) ProtoMessage ¶ added in v0.1.2
func (*VerificationHttpRouterRequest) ProtoMessage()
func (*VerificationHttpRouterRequest) Reset ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) Reset()
func (*VerificationHttpRouterRequest) String ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) String() string
func (*VerificationHttpRouterRequest) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) XXX_DiscardUnknown()
func (*VerificationHttpRouterRequest) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationHttpRouterRequest) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationHttpRouterRequest) XXX_Merge(src proto.Message)
func (*VerificationHttpRouterRequest) XXX_Size ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) XXX_Size() int
func (*VerificationHttpRouterRequest) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationHttpRouterRequest) XXX_Unmarshal(b []byte) error
type VerificationHttpRouterResponse ¶ added in v0.1.2
type VerificationHttpRouterResponse struct { Err *errors.BusinessError `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // 是否允许 Allow bool `protobuf:"varint,2,opt,name=allow,proto3" json:"allow,omitempty"` // 用户信息 UserInfo *VerificationHttpRouterResponse_UserInfo `protobuf:"bytes,3,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerificationHttpRouterResponse 验证HTTP路由权限响应参数
func (*VerificationHttpRouterResponse) Descriptor ¶ added in v0.1.2
func (*VerificationHttpRouterResponse) Descriptor() ([]byte, []int)
func (*VerificationHttpRouterResponse) GetAllow ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) GetAllow() bool
func (*VerificationHttpRouterResponse) GetErr ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) GetErr() *errors.BusinessError
func (*VerificationHttpRouterResponse) GetUserInfo ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) GetUserInfo() *VerificationHttpRouterResponse_UserInfo
func (*VerificationHttpRouterResponse) ProtoMessage ¶ added in v0.1.2
func (*VerificationHttpRouterResponse) ProtoMessage()
func (*VerificationHttpRouterResponse) Reset ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) Reset()
func (*VerificationHttpRouterResponse) String ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) String() string
func (*VerificationHttpRouterResponse) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) XXX_DiscardUnknown()
func (*VerificationHttpRouterResponse) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationHttpRouterResponse) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationHttpRouterResponse) XXX_Merge(src proto.Message)
func (*VerificationHttpRouterResponse) XXX_Size ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) XXX_Size() int
func (*VerificationHttpRouterResponse) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse) XXX_Unmarshal(b []byte) error
type VerificationHttpRouterResponse_UserInfo ¶ added in v0.1.2
type VerificationHttpRouterResponse_UserInfo struct { OpenId string `protobuf:"bytes,1,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` Gender uint32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
用户信息
func (*VerificationHttpRouterResponse_UserInfo) Descriptor ¶ added in v0.1.2
func (*VerificationHttpRouterResponse_UserInfo) Descriptor() ([]byte, []int)
func (*VerificationHttpRouterResponse_UserInfo) GetAvatarUrl ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) GetAvatarUrl() string
func (*VerificationHttpRouterResponse_UserInfo) GetGender ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) GetGender() uint32
func (*VerificationHttpRouterResponse_UserInfo) GetNickName ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) GetNickName() string
func (*VerificationHttpRouterResponse_UserInfo) GetOpenId ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) GetOpenId() string
func (*VerificationHttpRouterResponse_UserInfo) GetUsername ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) GetUsername() string
func (*VerificationHttpRouterResponse_UserInfo) ProtoMessage ¶ added in v0.1.2
func (*VerificationHttpRouterResponse_UserInfo) ProtoMessage()
func (*VerificationHttpRouterResponse_UserInfo) Reset ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) Reset()
func (*VerificationHttpRouterResponse_UserInfo) String ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) String() string
func (*VerificationHttpRouterResponse_UserInfo) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) XXX_DiscardUnknown()
func (*VerificationHttpRouterResponse_UserInfo) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationHttpRouterResponse_UserInfo) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationHttpRouterResponse_UserInfo) XXX_Merge(src proto.Message)
func (*VerificationHttpRouterResponse_UserInfo) XXX_Size ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) XXX_Size() int
func (*VerificationHttpRouterResponse_UserInfo) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationHttpRouterResponse_UserInfo) XXX_Unmarshal(b []byte) error
type VerificationTokenRequest ¶ added in v0.1.2
type VerificationTokenRequest struct { // 客户端 Client *OAuth2Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` // token Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // 是否返回用户信息,token验证通过的情况下 ReturnUserInfo bool `protobuf:"varint,3,opt,name=return_user_info,json=returnUserInfo,proto3" json:"return_user_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerificationTokenRequest 验证Token请求参数
func (*VerificationTokenRequest) Descriptor ¶ added in v0.1.2
func (*VerificationTokenRequest) Descriptor() ([]byte, []int)
func (*VerificationTokenRequest) GetClient ¶ added in v0.2.0
func (m *VerificationTokenRequest) GetClient() *OAuth2Client
func (*VerificationTokenRequest) GetReturnUserInfo ¶ added in v0.1.2
func (m *VerificationTokenRequest) GetReturnUserInfo() bool
func (*VerificationTokenRequest) GetToken ¶ added in v0.1.2
func (m *VerificationTokenRequest) GetToken() string
func (*VerificationTokenRequest) ProtoMessage ¶ added in v0.1.2
func (*VerificationTokenRequest) ProtoMessage()
func (*VerificationTokenRequest) Reset ¶ added in v0.1.2
func (m *VerificationTokenRequest) Reset()
func (*VerificationTokenRequest) String ¶ added in v0.1.2
func (m *VerificationTokenRequest) String() string
func (*VerificationTokenRequest) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationTokenRequest) XXX_DiscardUnknown()
func (*VerificationTokenRequest) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationTokenRequest) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationTokenRequest) XXX_Merge(src proto.Message)
func (*VerificationTokenRequest) XXX_Size ¶ added in v0.1.2
func (m *VerificationTokenRequest) XXX_Size() int
func (*VerificationTokenRequest) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationTokenRequest) XXX_Unmarshal(b []byte) error
type VerificationTokenResponse ¶ added in v0.1.2
type VerificationTokenResponse struct { Err *errors.BusinessError `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // 是否允许 Allow bool `protobuf:"varint,2,opt,name=allow,proto3" json:"allow,omitempty"` // 用户信息 UserInfo *VerificationTokenResponse_UserInfo `protobuf:"bytes,3,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerificationTokenResponse 验证Token响应参数
func (*VerificationTokenResponse) Descriptor ¶ added in v0.1.2
func (*VerificationTokenResponse) Descriptor() ([]byte, []int)
func (*VerificationTokenResponse) GetAllow ¶ added in v0.1.2
func (m *VerificationTokenResponse) GetAllow() bool
func (*VerificationTokenResponse) GetErr ¶ added in v0.1.2
func (m *VerificationTokenResponse) GetErr() *errors.BusinessError
func (*VerificationTokenResponse) GetUserInfo ¶ added in v0.1.2
func (m *VerificationTokenResponse) GetUserInfo() *VerificationTokenResponse_UserInfo
func (*VerificationTokenResponse) ProtoMessage ¶ added in v0.1.2
func (*VerificationTokenResponse) ProtoMessage()
func (*VerificationTokenResponse) Reset ¶ added in v0.1.2
func (m *VerificationTokenResponse) Reset()
func (*VerificationTokenResponse) String ¶ added in v0.1.2
func (m *VerificationTokenResponse) String() string
func (*VerificationTokenResponse) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationTokenResponse) XXX_DiscardUnknown()
func (*VerificationTokenResponse) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationTokenResponse) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationTokenResponse) XXX_Merge(src proto.Message)
func (*VerificationTokenResponse) XXX_Size ¶ added in v0.1.2
func (m *VerificationTokenResponse) XXX_Size() int
func (*VerificationTokenResponse) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationTokenResponse) XXX_Unmarshal(b []byte) error
type VerificationTokenResponse_UserInfo ¶ added in v0.1.2
type VerificationTokenResponse_UserInfo struct { OpenId string `protobuf:"bytes,1,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` Gender uint32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
用户信息
func (*VerificationTokenResponse_UserInfo) Descriptor ¶ added in v0.1.2
func (*VerificationTokenResponse_UserInfo) Descriptor() ([]byte, []int)
func (*VerificationTokenResponse_UserInfo) GetAvatarUrl ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) GetAvatarUrl() string
func (*VerificationTokenResponse_UserInfo) GetGender ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) GetGender() uint32
func (*VerificationTokenResponse_UserInfo) GetNickName ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) GetNickName() string
func (*VerificationTokenResponse_UserInfo) GetOpenId ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) GetOpenId() string
func (*VerificationTokenResponse_UserInfo) GetUsername ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) GetUsername() string
func (*VerificationTokenResponse_UserInfo) ProtoMessage ¶ added in v0.1.2
func (*VerificationTokenResponse_UserInfo) ProtoMessage()
func (*VerificationTokenResponse_UserInfo) Reset ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) Reset()
func (*VerificationTokenResponse_UserInfo) String ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) String() string
func (*VerificationTokenResponse_UserInfo) XXX_DiscardUnknown ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) XXX_DiscardUnknown()
func (*VerificationTokenResponse_UserInfo) XXX_Marshal ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerificationTokenResponse_UserInfo) XXX_Merge ¶ added in v0.1.2
func (dst *VerificationTokenResponse_UserInfo) XXX_Merge(src proto.Message)
func (*VerificationTokenResponse_UserInfo) XXX_Size ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) XXX_Size() int
func (*VerificationTokenResponse_UserInfo) XXX_Unmarshal ¶ added in v0.1.2
func (m *VerificationTokenResponse_UserInfo) XXX_Unmarshal(b []byte) error