Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetGithubId() string
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetRole() UserRole
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type DeleteUserRequest
- type DeleteUserResponse
- type GetOAuthCodeURLRequest
- func (*GetOAuthCodeURLRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOAuthCodeURLRequest) GetProvider() string
- func (x *GetOAuthCodeURLRequest) GetRedirectUrl() string
- func (*GetOAuthCodeURLRequest) ProtoMessage()
- func (x *GetOAuthCodeURLRequest) ProtoReflect() protoreflect.Message
- func (x *GetOAuthCodeURLRequest) Reset()
- func (x *GetOAuthCodeURLRequest) String() string
- type GetOAuthCodeURLResponse
- func (*GetOAuthCodeURLResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetOAuthCodeURLResponse) GetState() string
- func (x *GetOAuthCodeURLResponse) GetUrl() string
- func (*GetOAuthCodeURLResponse) ProtoMessage()
- func (x *GetOAuthCodeURLResponse) ProtoReflect() protoreflect.Message
- func (x *GetOAuthCodeURLResponse) Reset()
- func (x *GetOAuthCodeURLResponse) String() string
- type GetUserRequest
- type GetUserTokenRequest
- func (*GetUserTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserTokenRequest) GetSessionId() string
- func (*GetUserTokenRequest) ProtoMessage()
- func (x *GetUserTokenRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserTokenRequest) Reset()
- func (x *GetUserTokenRequest) String() string
- type ListUsersRequest
- func (*ListUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest) GetEmail() string
- func (x *ListUsersRequest) GetName() string
- func (x *ListUsersRequest) GetPage() uint64
- func (x *ListUsersRequest) GetPageSize() uint64
- func (x *ListUsersRequest) GetRole() UserRole
- func (*ListUsersRequest) ProtoMessage()
- func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest) Reset()
- func (x *ListUsersRequest) String() string
- type ListUsersResponse
- func (*ListUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersResponse) GetTotal() uint64
- func (x *ListUsersResponse) GetUsers() []*User
- func (*ListUsersResponse) ProtoMessage()
- func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
- func (x *ListUsersResponse) Reset()
- func (x *ListUsersResponse) String() string
- type LoginByOAuthRequest
- func (*LoginByOAuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginByOAuthRequest) GetCode() string
- func (x *LoginByOAuthRequest) GetState() string
- func (*LoginByOAuthRequest) ProtoMessage()
- func (x *LoginByOAuthRequest) ProtoReflect() protoreflect.Message
- func (x *LoginByOAuthRequest) Reset()
- func (x *LoginByOAuthRequest) String() string
- type LoginByPasswordRequest
- func (*LoginByPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginByPasswordRequest) GetEmail() string
- func (x *LoginByPasswordRequest) GetPassword() string
- func (*LoginByPasswordRequest) ProtoMessage()
- func (x *LoginByPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *LoginByPasswordRequest) Reset()
- func (x *LoginByPasswordRequest) String() string
- type LoginSession
- func (*LoginSession) Descriptor() ([]byte, []int)deprecated
- func (x *LoginSession) GetExpiresAt() *timestamppb.Timestamp
- func (x *LoginSession) GetId() string
- func (*LoginSession) ProtoMessage()
- func (x *LoginSession) ProtoReflect() protoreflect.Message
- func (x *LoginSession) Reset()
- func (x *LoginSession) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) GetOAuthCodeURL(context.Context, *GetOAuthCodeURLRequest) (*GetOAuthCodeURLResponse, error)
- func (UnimplementedAuthServiceServer) GetUserToken(context.Context, *GetUserTokenRequest) (*UserToken, error)
- func (UnimplementedAuthServiceServer) LoginByOAuth(context.Context, *LoginByOAuthRequest) (*LoginSession, error)
- func (UnimplementedAuthServiceServer) LoginByPassword(context.Context, *LoginByPasswordRequest) (*LoginSession, error)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetCurrentUser(context.Context, *emptypb.Empty) (*User, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
- type UnsafeAuthServiceServer
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetGithubId() string
- func (x *UpdateUserRequest) GetId() uint64
- func (x *UpdateUserRequest) GetName() string
- func (x *UpdateUserRequest) GetPassword() string
- func (x *UpdateUserRequest) GetRole() UserRole
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetGithubId() string
- func (x *User) GetId() uint64
- func (x *User) GetName() string
- func (x *User) GetRole() UserRole
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserRole
- type UserServiceClient
- type UserServiceServer
- type UserToken
- func (*UserToken) Descriptor() ([]byte, []int)deprecated
- func (x *UserToken) GetExpiresAt() *timestamppb.Timestamp
- func (x *UserToken) GetToken() string
- func (*UserToken) ProtoMessage()
- func (x *UserToken) ProtoReflect() protoreflect.Message
- func (x *UserToken) Reset()
- func (x *UserToken) String() string
Constants ¶
const ( AuthService_GetOAuthCodeURL_FullMethodName = "/AuthService/GetOAuthCodeURL" AuthService_LoginByOAuth_FullMethodName = "/AuthService/LoginByOAuth" AuthService_LoginByPassword_FullMethodName = "/AuthService/LoginByPassword" AuthService_GetUserToken_FullMethodName = "/AuthService/GetUserToken" )
const ( UserService_CreateUser_FullMethodName = "/UserService/CreateUser" UserService_GetCurrentUser_FullMethodName = "/UserService/GetCurrentUser" UserService_GetUser_FullMethodName = "/UserService/GetUser" UserService_ListUsers_FullMethodName = "/UserService/ListUsers" UserService_UpdateUser_FullMethodName = "/UserService/UpdateUser" UserService_DeleteUser_FullMethodName = "/UserService/DeleteUser" )
Variables ¶
var ( UserRole_name = map[int32]string{ 0: "USER", 1: "ADMIN", } UserRole_value = map[string]int32{ "USER": 0, "ADMIN": 1, } )
Enum value maps for UserRole.
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetOAuthCodeURL", Handler: _AuthService_GetOAuthCodeURL_Handler, }, { MethodName: "LoginByOAuth", Handler: _AuthService_LoginByOAuth_Handler, }, { MethodName: "LoginByPassword", Handler: _AuthService_LoginByPassword_Handler, }, { MethodName: "GetUserToken", Handler: _AuthService_GetUserToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auth_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetCurrentUser", Handler: _UserService_GetCurrentUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "ListUsers", Handler: _UserService_ListUsers_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
GetOAuthCodeURL(ctx context.Context, in *GetOAuthCodeURLRequest, opts ...grpc.CallOption) (*GetOAuthCodeURLResponse, error)
LoginByOAuth(ctx context.Context, in *LoginByOAuthRequest, opts ...grpc.CallOption) (*LoginSession, error)
LoginByPassword(ctx context.Context, in *LoginByPasswordRequest, opts ...grpc.CallOption) (*LoginSession, error)
GetUserToken(ctx context.Context, in *GetUserTokenRequest, opts ...grpc.CallOption) (*UserToken, error)
}
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface {
GetOAuthCodeURL(context.Context, *GetOAuthCodeURLRequest) (*GetOAuthCodeURLResponse, error)
LoginByOAuth(context.Context, *LoginByOAuthRequest) (*LoginSession, error)
LoginByPassword(context.Context, *LoginByPasswordRequest) (*LoginSession, error)
GetUserToken(context.Context, *GetUserTokenRequest) (*UserToken, error)
// contains filtered or unexported methods
}
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
type CreateUserRequest ¶
type CreateUserRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
Role UserRole `protobuf:"varint,3,opt,name=role,proto3,enum=UserRole" json:"role,omitempty"`
Password *string `protobuf:"bytes,4,opt,name=password,proto3,oneof" json:"password,omitempty"`
GithubId *string `protobuf:"bytes,5,opt,name=github_id,json=githubId,proto3,oneof" json:"github_id,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetGithubId ¶
func (x *CreateUserRequest) GetGithubId() string
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetRole ¶
func (x *CreateUserRequest) GetRole() UserRole
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() uint64
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserResponse) Descriptor
deprecated
func (*DeleteUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserResponse) GetId ¶
func (x *DeleteUserResponse) GetId() uint64
func (*DeleteUserResponse) ProtoMessage ¶
func (*DeleteUserResponse) ProtoMessage()
func (*DeleteUserResponse) ProtoReflect ¶
func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserResponse) Reset ¶
func (x *DeleteUserResponse) Reset()
func (*DeleteUserResponse) String ¶
func (x *DeleteUserResponse) String() string
type GetOAuthCodeURLRequest ¶
type GetOAuthCodeURLRequest struct {
Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
RedirectUrl *string `protobuf:"bytes,2,opt,name=redirect_url,json=redirectUrl,proto3,oneof" json:"redirect_url,omitempty"`
// contains filtered or unexported fields
}
func (*GetOAuthCodeURLRequest) Descriptor
deprecated
func (*GetOAuthCodeURLRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOAuthCodeURLRequest.ProtoReflect.Descriptor instead.
func (*GetOAuthCodeURLRequest) GetProvider ¶
func (x *GetOAuthCodeURLRequest) GetProvider() string
func (*GetOAuthCodeURLRequest) GetRedirectUrl ¶ added in v0.1.1
func (x *GetOAuthCodeURLRequest) GetRedirectUrl() string
func (*GetOAuthCodeURLRequest) ProtoMessage ¶
func (*GetOAuthCodeURLRequest) ProtoMessage()
func (*GetOAuthCodeURLRequest) ProtoReflect ¶
func (x *GetOAuthCodeURLRequest) ProtoReflect() protoreflect.Message
func (*GetOAuthCodeURLRequest) Reset ¶
func (x *GetOAuthCodeURLRequest) Reset()
func (*GetOAuthCodeURLRequest) String ¶
func (x *GetOAuthCodeURLRequest) String() string
type GetOAuthCodeURLResponse ¶
type GetOAuthCodeURLResponse struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
// contains filtered or unexported fields
}
func (*GetOAuthCodeURLResponse) Descriptor
deprecated
func (*GetOAuthCodeURLResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOAuthCodeURLResponse.ProtoReflect.Descriptor instead.
func (*GetOAuthCodeURLResponse) GetState ¶
func (x *GetOAuthCodeURLResponse) GetState() string
func (*GetOAuthCodeURLResponse) GetUrl ¶
func (x *GetOAuthCodeURLResponse) GetUrl() string
func (*GetOAuthCodeURLResponse) ProtoMessage ¶
func (*GetOAuthCodeURLResponse) ProtoMessage()
func (*GetOAuthCodeURLResponse) ProtoReflect ¶
func (x *GetOAuthCodeURLResponse) ProtoReflect() protoreflect.Message
func (*GetOAuthCodeURLResponse) Reset ¶
func (x *GetOAuthCodeURLResponse) Reset()
func (*GetOAuthCodeURLResponse) String ¶
func (x *GetOAuthCodeURLResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() uint64
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserTokenRequest ¶
type GetUserTokenRequest struct {
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserTokenRequest) Descriptor
deprecated
func (*GetUserTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserTokenRequest.ProtoReflect.Descriptor instead.
func (*GetUserTokenRequest) GetSessionId ¶
func (x *GetUserTokenRequest) GetSessionId() string
func (*GetUserTokenRequest) ProtoMessage ¶
func (*GetUserTokenRequest) ProtoMessage()
func (*GetUserTokenRequest) ProtoReflect ¶
func (x *GetUserTokenRequest) ProtoReflect() protoreflect.Message
func (*GetUserTokenRequest) Reset ¶
func (x *GetUserTokenRequest) Reset()
func (*GetUserTokenRequest) String ¶
func (x *GetUserTokenRequest) String() string
type ListUsersRequest ¶
type ListUsersRequest struct {
Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
PageSize uint64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"`
Email *string `protobuf:"bytes,4,opt,name=email,proto3,oneof" json:"email,omitempty"`
Role *UserRole `protobuf:"varint,5,opt,name=role,proto3,enum=UserRole,oneof" json:"role,omitempty"`
// contains filtered or unexported fields
}
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) GetEmail ¶ added in v0.1.2
func (x *ListUsersRequest) GetEmail() string
func (*ListUsersRequest) GetName ¶ added in v0.1.2
func (x *ListUsersRequest) GetName() string
func (*ListUsersRequest) GetPage ¶
func (x *ListUsersRequest) GetPage() uint64
func (*ListUsersRequest) GetPageSize ¶
func (x *ListUsersRequest) GetPageSize() uint64
func (*ListUsersRequest) GetRole ¶ added in v0.1.2
func (x *ListUsersRequest) GetRole() UserRole
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type ListUsersResponse ¶
type ListUsersResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
// contains filtered or unexported fields
}
func (*ListUsersResponse) Descriptor
deprecated
func (*ListUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.
func (*ListUsersResponse) GetTotal ¶
func (x *ListUsersResponse) GetTotal() uint64
func (*ListUsersResponse) GetUsers ¶
func (x *ListUsersResponse) GetUsers() []*User
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) ProtoReflect ¶
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
func (*ListUsersResponse) Reset ¶
func (x *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (x *ListUsersResponse) String() string
type LoginByOAuthRequest ¶
type LoginByOAuthRequest struct {
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
// contains filtered or unexported fields
}
func (*LoginByOAuthRequest) Descriptor
deprecated
func (*LoginByOAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginByOAuthRequest.ProtoReflect.Descriptor instead.
func (*LoginByOAuthRequest) GetCode ¶
func (x *LoginByOAuthRequest) GetCode() string
func (*LoginByOAuthRequest) GetState ¶
func (x *LoginByOAuthRequest) GetState() string
func (*LoginByOAuthRequest) ProtoMessage ¶
func (*LoginByOAuthRequest) ProtoMessage()
func (*LoginByOAuthRequest) ProtoReflect ¶
func (x *LoginByOAuthRequest) ProtoReflect() protoreflect.Message
func (*LoginByOAuthRequest) Reset ¶
func (x *LoginByOAuthRequest) Reset()
func (*LoginByOAuthRequest) String ¶
func (x *LoginByOAuthRequest) String() string
type LoginByPasswordRequest ¶
type LoginByPasswordRequest struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
func (*LoginByPasswordRequest) Descriptor
deprecated
func (*LoginByPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginByPasswordRequest.ProtoReflect.Descriptor instead.
func (*LoginByPasswordRequest) GetEmail ¶
func (x *LoginByPasswordRequest) GetEmail() string
func (*LoginByPasswordRequest) GetPassword ¶
func (x *LoginByPasswordRequest) GetPassword() string
func (*LoginByPasswordRequest) ProtoMessage ¶
func (*LoginByPasswordRequest) ProtoMessage()
func (*LoginByPasswordRequest) ProtoReflect ¶
func (x *LoginByPasswordRequest) ProtoReflect() protoreflect.Message
func (*LoginByPasswordRequest) Reset ¶
func (x *LoginByPasswordRequest) Reset()
func (*LoginByPasswordRequest) String ¶
func (x *LoginByPasswordRequest) String() string
type LoginSession ¶
type LoginSession struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
func (*LoginSession) Descriptor
deprecated
func (*LoginSession) Descriptor() ([]byte, []int)
Deprecated: Use LoginSession.ProtoReflect.Descriptor instead.
func (*LoginSession) GetExpiresAt ¶
func (x *LoginSession) GetExpiresAt() *timestamppb.Timestamp
func (*LoginSession) GetId ¶
func (x *LoginSession) GetId() string
func (*LoginSession) ProtoMessage ¶
func (*LoginSession) ProtoMessage()
func (*LoginSession) ProtoReflect ¶
func (x *LoginSession) ProtoReflect() protoreflect.Message
func (*LoginSession) Reset ¶
func (x *LoginSession) Reset()
func (*LoginSession) String ¶
func (x *LoginSession) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthServiceServer) GetOAuthCodeURL ¶
func (UnimplementedAuthServiceServer) GetOAuthCodeURL(context.Context, *GetOAuthCodeURLRequest) (*GetOAuthCodeURLResponse, error)
func (UnimplementedAuthServiceServer) GetUserToken ¶
func (UnimplementedAuthServiceServer) GetUserToken(context.Context, *GetUserTokenRequest) (*UserToken, error)
func (UnimplementedAuthServiceServer) LoginByOAuth ¶
func (UnimplementedAuthServiceServer) LoginByOAuth(context.Context, *LoginByOAuthRequest) (*LoginSession, error)
func (UnimplementedAuthServiceServer) LoginByPassword ¶
func (UnimplementedAuthServiceServer) LoginByPassword(context.Context, *LoginByPasswordRequest) (*LoginSession, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) GetCurrentUser ¶
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
func (UnimplementedUserServiceServer) ListUsers ¶
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"`
Role *UserRole `protobuf:"varint,4,opt,name=role,proto3,enum=UserRole,oneof" json:"role,omitempty"`
Password *string `protobuf:"bytes,5,opt,name=password,proto3,oneof" json:"password,omitempty"`
GithubId *string `protobuf:"bytes,6,opt,name=github_id,json=githubId,proto3,oneof" json:"github_id,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() string
func (*UpdateUserRequest) GetGithubId ¶
func (x *UpdateUserRequest) GetGithubId() string
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() uint64
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) GetPassword ¶
func (x *UpdateUserRequest) GetPassword() string
func (*UpdateUserRequest) GetRole ¶
func (x *UpdateUserRequest) GetRole() UserRole
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type User ¶
type User struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
Role UserRole `protobuf:"varint,6,opt,name=role,proto3,enum=UserRole" json:"role,omitempty"`
GithubId *string `protobuf:"bytes,7,opt,name=github_id,json=githubId,proto3,oneof" json:"github_id,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetGithubId ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserRole ¶
type UserRole int32
func (UserRole) Descriptor ¶
func (UserRole) Descriptor() protoreflect.EnumDescriptor
func (UserRole) EnumDescriptor
deprecated
func (UserRole) Number ¶
func (x UserRole) Number() protoreflect.EnumNumber
func (UserRole) Type ¶
func (UserRole) Type() protoreflect.EnumType
type UserServiceClient ¶
type UserServiceClient interface {
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetCurrentUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*User, error)
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
GetCurrentUser(context.Context, *emptypb.Empty) (*User, error)
GetUser(context.Context, *GetUserRequest) (*User, error)
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
type UserToken ¶
type UserToken struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
func (*UserToken) Descriptor
deprecated
func (*UserToken) GetExpiresAt ¶
func (x *UserToken) GetExpiresAt() *timestamppb.Timestamp
func (*UserToken) ProtoMessage ¶
func (*UserToken) ProtoMessage()
func (*UserToken) ProtoReflect ¶
func (x *UserToken) ProtoReflect() protoreflect.Message