Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthServer
- type DeleteRequest
- type GerAllResponse
- func (*GerAllResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GerAllResponse) GetAllUsers() []*User
- func (x *GerAllResponse) GetCount() int32
- func (*GerAllResponse) ProtoMessage()
- func (x *GerAllResponse) ProtoReflect() protoreflect.Message
- func (x *GerAllResponse) Reset()
- func (x *GerAllResponse) String() string
- type GetAllUsersRequest
- func (*GetAllUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUsersRequest) GetField() string
- func (x *GetAllUsersRequest) GetLimit() int32
- func (x *GetAllUsersRequest) GetPage() int32
- func (x *GetAllUsersRequest) GetValues() string
- func (*GetAllUsersRequest) ProtoMessage()
- func (x *GetAllUsersRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllUsersRequest) Reset()
- func (x *GetAllUsersRequest) String() string
- type GetRequest
- type IsAdminRequest
- type IsAdminResponse
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetAppId() int32
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetPassword() string
- func (x *RegisterRequest) GetRole() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type Status
- type UnimplementedAuthServer
- func (UnimplementedAuthServer) Delete(context.Context, *DeleteRequest) (*Status, error)
- func (UnimplementedAuthServer) GetAllUsers(context.Context, *GetAllUsersRequest) (*GerAllResponse, error)
- func (UnimplementedAuthServer) GetUsersById(context.Context, *GetRequest) (*User, error)
- func (UnimplementedAuthServer) IsAdmin(context.Context, *IsAdminRequest) (*IsAdminResponse, error)
- func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedAuthServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- func (UnimplementedAuthServer) UpdateUser(context.Context, *User) (*User, error)
- type UnsafeAuthServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetPassword() string
- func (x *User) GetRole() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
const ( Auth_Register_FullMethodName = "/auth.Auth/Register" Auth_Login_FullMethodName = "/auth.Auth/Login" Auth_IsAdmin_FullMethodName = "/auth.Auth/IsAdmin" Auth_UpdateUser_FullMethodName = "/auth.Auth/UpdateUser" Auth_Delete_FullMethodName = "/auth.Auth/Delete" Auth_GetAllUsers_FullMethodName = "/auth.Auth/GetAllUsers" Auth_GetUsersById_FullMethodName = "/auth.Auth/GetUsersById" )
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Auth_Register_Handler, }, { MethodName: "Login", Handler: _Auth_Login_Handler, }, { MethodName: "IsAdmin", Handler: _Auth_IsAdmin_Handler, }, { MethodName: "UpdateUser", Handler: _Auth_UpdateUser_Handler, }, { MethodName: "Delete", Handler: _Auth_Delete_Handler, }, { MethodName: "GetAllUsers", Handler: _Auth_GetAllUsers_Handler, }, { MethodName: "GetUsersById", Handler: _Auth_GetUsersById_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sso/sso.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_sso_sso_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) IsAdmin(ctx context.Context, in *IsAdminRequest, opts ...grpc.CallOption) (*IsAdminResponse, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Status, error) GetAllUsers(ctx context.Context, in *GetAllUsersRequest, opts ...grpc.CallOption) (*GerAllResponse, error) GetUsersById(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*User, error) }
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) IsAdmin(context.Context, *IsAdminRequest) (*IsAdminResponse, error) UpdateUser(context.Context, *User) (*User, error) Delete(context.Context, *DeleteRequest) (*Status, error) GetAllUsers(context.Context, *GetAllUsersRequest) (*GerAllResponse, error) GetUsersById(context.Context, *GetRequest) (*User, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type DeleteRequest ¶ added in v0.0.4
type DeleteRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
added in
v0.0.4
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetClientId ¶ added in v0.0.4
func (x *DeleteRequest) GetClientId() string
func (*DeleteRequest) ProtoMessage ¶ added in v0.0.4
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶ added in v0.0.4
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶ added in v0.0.4
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶ added in v0.0.4
func (x *DeleteRequest) String() string
type GerAllResponse ¶ added in v0.0.4
type GerAllResponse struct { AllUsers []*User `protobuf:"bytes,1,rep,name=allUsers,proto3" json:"allUsers,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GerAllResponse) Descriptor
deprecated
added in
v0.0.4
func (*GerAllResponse) Descriptor() ([]byte, []int)
Deprecated: Use GerAllResponse.ProtoReflect.Descriptor instead.
func (*GerAllResponse) GetAllUsers ¶ added in v0.0.4
func (x *GerAllResponse) GetAllUsers() []*User
func (*GerAllResponse) GetCount ¶ added in v0.0.4
func (x *GerAllResponse) GetCount() int32
func (*GerAllResponse) ProtoMessage ¶ added in v0.0.4
func (*GerAllResponse) ProtoMessage()
func (*GerAllResponse) ProtoReflect ¶ added in v0.0.4
func (x *GerAllResponse) ProtoReflect() protoreflect.Message
func (*GerAllResponse) Reset ¶ added in v0.0.4
func (x *GerAllResponse) Reset()
func (*GerAllResponse) String ¶ added in v0.0.4
func (x *GerAllResponse) String() string
type GetAllUsersRequest ¶ added in v0.0.4
type GetAllUsersRequest struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` Values string `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*GetAllUsersRequest) Descriptor
deprecated
added in
v0.0.4
func (*GetAllUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUsersRequest.ProtoReflect.Descriptor instead.
func (*GetAllUsersRequest) GetField ¶ added in v0.0.4
func (x *GetAllUsersRequest) GetField() string
func (*GetAllUsersRequest) GetLimit ¶ added in v0.0.4
func (x *GetAllUsersRequest) GetLimit() int32
func (*GetAllUsersRequest) GetPage ¶ added in v0.0.4
func (x *GetAllUsersRequest) GetPage() int32
func (*GetAllUsersRequest) GetValues ¶ added in v0.0.4
func (x *GetAllUsersRequest) GetValues() string
func (*GetAllUsersRequest) ProtoMessage ¶ added in v0.0.4
func (*GetAllUsersRequest) ProtoMessage()
func (*GetAllUsersRequest) ProtoReflect ¶ added in v0.0.4
func (x *GetAllUsersRequest) ProtoReflect() protoreflect.Message
func (*GetAllUsersRequest) Reset ¶ added in v0.0.4
func (x *GetAllUsersRequest) Reset()
func (*GetAllUsersRequest) String ¶ added in v0.0.4
func (x *GetAllUsersRequest) String() string
type GetRequest ¶ added in v0.0.4
type GetRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
added in
v0.0.4
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetIsActive ¶ added in v0.0.4
func (x *GetRequest) GetIsActive() bool
func (*GetRequest) GetUserId ¶ added in v0.0.4
func (x *GetRequest) GetUserId() string
func (*GetRequest) ProtoMessage ¶ added in v0.0.4
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶ added in v0.0.4
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶ added in v0.0.4
func (x *GetRequest) Reset()
func (*GetRequest) String ¶ added in v0.0.4
func (x *GetRequest) String() string
type IsAdminRequest ¶
type IsAdminRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*IsAdminRequest) Descriptor
deprecated
func (*IsAdminRequest) Descriptor() ([]byte, []int)
Deprecated: Use IsAdminRequest.ProtoReflect.Descriptor instead.
func (*IsAdminRequest) GetUserId ¶
func (x *IsAdminRequest) GetUserId() string
func (*IsAdminRequest) ProtoMessage ¶
func (*IsAdminRequest) ProtoMessage()
func (*IsAdminRequest) ProtoReflect ¶
func (x *IsAdminRequest) ProtoReflect() protoreflect.Message
func (*IsAdminRequest) Reset ¶
func (x *IsAdminRequest) Reset()
func (*IsAdminRequest) String ¶
func (x *IsAdminRequest) String() string
type IsAdminResponse ¶
type IsAdminResponse struct { IsAdmin bool `protobuf:"varint,1,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"` // contains filtered or unexported fields }
func (*IsAdminResponse) Descriptor
deprecated
func (*IsAdminResponse) Descriptor() ([]byte, []int)
Deprecated: Use IsAdminResponse.ProtoReflect.Descriptor instead.
func (*IsAdminResponse) GetIsAdmin ¶
func (x *IsAdminResponse) GetIsAdmin() bool
func (*IsAdminResponse) ProtoMessage ¶
func (*IsAdminResponse) ProtoMessage()
func (*IsAdminResponse) ProtoReflect ¶
func (x *IsAdminResponse) ProtoReflect() protoreflect.Message
func (*IsAdminResponse) Reset ¶
func (x *IsAdminResponse) Reset()
func (*IsAdminResponse) String ¶
func (x *IsAdminResponse) String() string
type LoginRequest ¶
type LoginRequest 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"` AppId int32 `protobuf:"varint,4,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetAppId ¶
func (x *LoginRequest) GetAppId() int32
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type RegisterRequest ¶
type RegisterRequest 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"` Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetRole ¶ added in v0.0.11
func (x *RegisterRequest) GetRole() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetUserId ¶
func (x *RegisterResponse) GetUserId() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type Status ¶ added in v0.0.4
type Status struct { Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
added in
v0.0.4
func (*Status) ProtoMessage ¶ added in v0.0.4
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶ added in v0.0.4
func (x *Status) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) Delete ¶ added in v0.0.4
func (UnimplementedAuthServer) Delete(context.Context, *DeleteRequest) (*Status, error)
func (UnimplementedAuthServer) GetAllUsers ¶ added in v0.0.4
func (UnimplementedAuthServer) GetAllUsers(context.Context, *GetAllUsersRequest) (*GerAllResponse, error)
func (UnimplementedAuthServer) GetUsersById ¶ added in v0.0.4
func (UnimplementedAuthServer) GetUsersById(context.Context, *GetRequest) (*User, error)
func (UnimplementedAuthServer) IsAdmin ¶
func (UnimplementedAuthServer) IsAdmin(context.Context, *IsAdminRequest) (*IsAdminResponse, error)
func (UnimplementedAuthServer) Login ¶
func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedAuthServer) Register ¶
func (UnimplementedAuthServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedAuthServer) UpdateUser ¶ added in v0.0.4
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.
type User ¶ added in v0.0.4
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
added in
v0.0.4
func (*User) GetPassword ¶ added in v0.0.4
func (*User) ProtoMessage ¶ added in v0.0.4
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶ added in v0.0.4
func (x *User) ProtoReflect() protoreflect.Message