Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGitHubHTTPServer(s *http.Server, srv GitHubHTTPServer)
- func RegisterGitHubServer(s grpc.ServiceRegistrar, srv GitHubServer)
- type AvatarReply
- type AvatarRequest
- type GitHubClient
- type GitHubHTTPClient
- type GitHubHTTPClientImpl
- func (c *GitHubHTTPClientImpl) Avatar(ctx context.Context, in *AvatarRequest, opts ...http.CallOption) (*AvatarReply, error)
- func (c *GitHubHTTPClientImpl) ListSessions(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListSessionsReply, error)
- func (c *GitHubHTTPClientImpl) ListUsers(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListUsersReply, error)
- func (c *GitHubHTTPClientImpl) Logout(ctx context.Context, in *LogoutRequest, opts ...http.CallOption) (*LogoutReply, error)
- type GitHubHTTPServer
- type GitHubServer
- type ListRequest
- type ListSessionsReply
- func (*ListSessionsReply) Descriptor() ([]byte, []int)deprecated
- func (x *ListSessionsReply) GetSession() []*Session
- func (*ListSessionsReply) ProtoMessage()
- func (x *ListSessionsReply) ProtoReflect() protoreflect.Message
- func (x *ListSessionsReply) Reset()
- func (x *ListSessionsReply) String() string
- type ListUsersReply
- type LogoutReply
- type LogoutRequest
- type Session
- type UnimplementedGitHubServer
- func (UnimplementedGitHubServer) Avatar(context.Context, *AvatarRequest) (*AvatarReply, error)
- func (UnimplementedGitHubServer) ListSessions(context.Context, *ListRequest) (*ListSessionsReply, error)
- func (UnimplementedGitHubServer) ListUsers(context.Context, *ListRequest) (*ListUsersReply, error)
- func (UnimplementedGitHubServer) Logout(context.Context, *LogoutRequest) (*LogoutReply, error)
- type UnsafeGitHubServer
- type User
Constants ¶
const ( GitHub_ListUsers_FullMethodName = "/github.v1.GitHub/ListUsers" GitHub_ListSessions_FullMethodName = "/github.v1.GitHub/ListSessions" GitHub_Avatar_FullMethodName = "/github.v1.GitHub/Avatar" GitHub_Logout_FullMethodName = "/github.v1.GitHub/Logout" )
const OperationGitHubAvatar = "/github.v1.GitHub/Avatar"
const OperationGitHubListSessions = "/github.v1.GitHub/ListSessions"
const OperationGitHubListUsers = "/github.v1.GitHub/ListUsers"
const OperationGitHubLogout = "/github.v1.GitHub/Logout"
Variables ¶
var File_github_v1_github_proto protoreflect.FileDescriptor
var GitHub_ServiceDesc = grpc.ServiceDesc{ ServiceName: "github.v1.GitHub", HandlerType: (*GitHubServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListUsers", Handler: _GitHub_ListUsers_Handler, }, { MethodName: "ListSessions", Handler: _GitHub_ListSessions_Handler, }, { MethodName: "Avatar", Handler: _GitHub_Avatar_Handler, }, { MethodName: "Logout", Handler: _GitHub_Logout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github/v1/github.proto", }
GitHub_ServiceDesc is the grpc.ServiceDesc for GitHub service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGitHubHTTPServer ¶
func RegisterGitHubHTTPServer(s *http.Server, srv GitHubHTTPServer)
func RegisterGitHubServer ¶
func RegisterGitHubServer(s grpc.ServiceRegistrar, srv GitHubServer)
Types ¶
type AvatarReply ¶
type AvatarReply struct { AvatarUrl string `protobuf:"bytes,1,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // contains filtered or unexported fields }
func (*AvatarReply) Descriptor
deprecated
func (*AvatarReply) Descriptor() ([]byte, []int)
Deprecated: Use AvatarReply.ProtoReflect.Descriptor instead.
func (*AvatarReply) GetAvatarUrl ¶
func (x *AvatarReply) GetAvatarUrl() string
func (*AvatarReply) ProtoMessage ¶
func (*AvatarReply) ProtoMessage()
func (*AvatarReply) ProtoReflect ¶
func (x *AvatarReply) ProtoReflect() protoreflect.Message
func (*AvatarReply) Reset ¶
func (x *AvatarReply) Reset()
func (*AvatarReply) String ¶
func (x *AvatarReply) String() string
type AvatarRequest ¶
type AvatarRequest struct {
// contains filtered or unexported fields
}
func (*AvatarRequest) Descriptor
deprecated
func (*AvatarRequest) Descriptor() ([]byte, []int)
Deprecated: Use AvatarRequest.ProtoReflect.Descriptor instead.
func (*AvatarRequest) ProtoMessage ¶
func (*AvatarRequest) ProtoMessage()
func (*AvatarRequest) ProtoReflect ¶
func (x *AvatarRequest) ProtoReflect() protoreflect.Message
func (*AvatarRequest) Reset ¶
func (x *AvatarRequest) Reset()
func (*AvatarRequest) String ¶
func (x *AvatarRequest) String() string
type GitHubClient ¶
type GitHubClient interface { ListUsers(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListUsersReply, error) ListSessions(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListSessionsReply, error) Avatar(ctx context.Context, in *AvatarRequest, opts ...grpc.CallOption) (*AvatarReply, error) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error) }
GitHubClient is the client API for GitHub service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGitHubClient ¶
func NewGitHubClient(cc grpc.ClientConnInterface) GitHubClient
type GitHubHTTPClient ¶
type GitHubHTTPClient interface { Avatar(ctx context.Context, req *AvatarRequest, opts ...http.CallOption) (rsp *AvatarReply, err error) ListSessions(ctx context.Context, req *ListRequest, opts ...http.CallOption) (rsp *ListSessionsReply, err error) ListUsers(ctx context.Context, req *ListRequest, opts ...http.CallOption) (rsp *ListUsersReply, err error) Logout(ctx context.Context, req *LogoutRequest, opts ...http.CallOption) (rsp *LogoutReply, err error) }
func NewGitHubHTTPClient ¶
func NewGitHubHTTPClient(client *http.Client) GitHubHTTPClient
type GitHubHTTPClientImpl ¶
type GitHubHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GitHubHTTPClientImpl) Avatar ¶
func (c *GitHubHTTPClientImpl) Avatar(ctx context.Context, in *AvatarRequest, opts ...http.CallOption) (*AvatarReply, error)
func (*GitHubHTTPClientImpl) ListSessions ¶
func (c *GitHubHTTPClientImpl) ListSessions(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListSessionsReply, error)
func (*GitHubHTTPClientImpl) ListUsers ¶
func (c *GitHubHTTPClientImpl) ListUsers(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListUsersReply, error)
func (*GitHubHTTPClientImpl) Logout ¶
func (c *GitHubHTTPClientImpl) Logout(ctx context.Context, in *LogoutRequest, opts ...http.CallOption) (*LogoutReply, error)
type GitHubHTTPServer ¶
type GitHubHTTPServer interface { Avatar(context.Context, *AvatarRequest) (*AvatarReply, error) ListSessions(context.Context, *ListRequest) (*ListSessionsReply, error) ListUsers(context.Context, *ListRequest) (*ListUsersReply, error) Logout(context.Context, *LogoutRequest) (*LogoutReply, error) }
type GitHubServer ¶
type GitHubServer interface { ListUsers(context.Context, *ListRequest) (*ListUsersReply, error) ListSessions(context.Context, *ListRequest) (*ListSessionsReply, error) Avatar(context.Context, *AvatarRequest) (*AvatarReply, error) Logout(context.Context, *LogoutRequest) (*LogoutReply, error) // contains filtered or unexported methods }
GitHubServer is the server API for GitHub service. All implementations must embed UnimplementedGitHubServer for forward compatibility
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListSessionsReply ¶
type ListSessionsReply struct { Session []*Session `protobuf:"bytes,1,rep,name=session,proto3" json:"session,omitempty"` // contains filtered or unexported fields }
func (*ListSessionsReply) Descriptor
deprecated
func (*ListSessionsReply) Descriptor() ([]byte, []int)
Deprecated: Use ListSessionsReply.ProtoReflect.Descriptor instead.
func (*ListSessionsReply) GetSession ¶
func (x *ListSessionsReply) GetSession() []*Session
func (*ListSessionsReply) ProtoMessage ¶
func (*ListSessionsReply) ProtoMessage()
func (*ListSessionsReply) ProtoReflect ¶
func (x *ListSessionsReply) ProtoReflect() protoreflect.Message
func (*ListSessionsReply) Reset ¶
func (x *ListSessionsReply) Reset()
func (*ListSessionsReply) String ¶
func (x *ListSessionsReply) String() string
type ListUsersReply ¶
type ListUsersReply struct { User []*User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ListUsersReply) Descriptor
deprecated
func (*ListUsersReply) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersReply.ProtoReflect.Descriptor instead.
func (*ListUsersReply) GetUser ¶
func (x *ListUsersReply) GetUser() []*User
func (*ListUsersReply) ProtoMessage ¶
func (*ListUsersReply) ProtoMessage()
func (*ListUsersReply) ProtoReflect ¶
func (x *ListUsersReply) ProtoReflect() protoreflect.Message
func (*ListUsersReply) Reset ¶
func (x *ListUsersReply) Reset()
func (*ListUsersReply) String ¶
func (x *ListUsersReply) String() string
type LogoutReply ¶
type LogoutReply struct { LoggedOut bool `protobuf:"varint,1,opt,name=loggedOut,proto3" json:"loggedOut,omitempty"` // contains filtered or unexported fields }
func (*LogoutReply) Descriptor
deprecated
func (*LogoutReply) Descriptor() ([]byte, []int)
Deprecated: Use LogoutReply.ProtoReflect.Descriptor instead.
func (*LogoutReply) GetLoggedOut ¶
func (x *LogoutReply) GetLoggedOut() bool
func (*LogoutReply) ProtoMessage ¶
func (*LogoutReply) ProtoMessage()
func (*LogoutReply) ProtoReflect ¶
func (x *LogoutReply) ProtoReflect() protoreflect.Message
func (*LogoutReply) Reset ¶
func (x *LogoutReply) Reset()
func (*LogoutReply) String ¶
func (x *LogoutReply) String() string
type LogoutRequest ¶
type LogoutRequest struct {
// contains filtered or unexported fields
}
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
type Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` GhId uint32 `protobuf:"varint,2,opt,name=gh_id,json=ghId,proto3" json:"gh_id,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type UnimplementedGitHubServer ¶
type UnimplementedGitHubServer struct { }
UnimplementedGitHubServer must be embedded to have forward compatible implementations.
func (UnimplementedGitHubServer) Avatar ¶
func (UnimplementedGitHubServer) Avatar(context.Context, *AvatarRequest) (*AvatarReply, error)
func (UnimplementedGitHubServer) ListSessions ¶
func (UnimplementedGitHubServer) ListSessions(context.Context, *ListRequest) (*ListSessionsReply, error)
func (UnimplementedGitHubServer) ListUsers ¶
func (UnimplementedGitHubServer) ListUsers(context.Context, *ListRequest) (*ListUsersReply, error)
func (UnimplementedGitHubServer) Logout ¶
func (UnimplementedGitHubServer) Logout(context.Context, *LogoutRequest) (*LogoutReply, error)
type UnsafeGitHubServer ¶
type UnsafeGitHubServer interface {
// contains filtered or unexported methods
}
UnsafeGitHubServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GitHubServer will result in compilation errors.
type User ¶
type User struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message