Documentation ¶
Index ¶
- Variables
- func RegisterAuthorizationServer(s grpc.ServiceRegistrar, srv AuthorizationServer)
- type AuthorizationClient
- type AuthorizationServer
- type BoolResult
- type Empty
- type Session
- type SessionId
- type SetAuthSessionMsg
- func (*SetAuthSessionMsg) Descriptor() ([]byte, []int)deprecated
- func (x *SetAuthSessionMsg) GetExpires() string
- func (x *SetAuthSessionMsg) GetUserId() uint64
- func (*SetAuthSessionMsg) ProtoMessage()
- func (x *SetAuthSessionMsg) ProtoReflect() protoreflect.Message
- func (x *SetAuthSessionMsg) Reset()
- func (x *SetAuthSessionMsg) String() string
- type SetUnauthSession
- type UnimplementedAuthorizationServer
- func (UnimplementedAuthorizationServer) DeleteSession(context.Context, *SessionId) (*Empty, error)
- func (UnimplementedAuthorizationServer) GetSession(context.Context, *SessionId) (*Session, error)
- func (UnimplementedAuthorizationServer) IsAuthSession(context.Context, *SessionId) (*BoolResult, error)
- func (UnimplementedAuthorizationServer) IsSession(context.Context, *SessionId) (*BoolResult, error)
- func (UnimplementedAuthorizationServer) MakeSessionAuthorized(context.Context, *UserSessionId) (*SessionId, error)
- func (UnimplementedAuthorizationServer) MakeSessionUnauthorized(context.Context, *SessionId) (*SessionId, error)
- func (UnimplementedAuthorizationServer) SetNewAuthorizedSession(context.Context, *SetAuthSessionMsg) (*SessionId, error)
- func (UnimplementedAuthorizationServer) SetNewUnauthorizedSession(context.Context, *SetUnauthSession) (*SessionId, error)
- type UnsafeAuthorizationServer
- type UserSessionId
- func (*UserSessionId) Descriptor() ([]byte, []int)deprecated
- func (x *UserSessionId) GetSessionId() string
- func (x *UserSessionId) GetUserId() uint64
- func (*UserSessionId) ProtoMessage()
- func (x *UserSessionId) ProtoReflect() protoreflect.Message
- func (x *UserSessionId) Reset()
- func (x *UserSessionId) String() string
Constants ¶
This section is empty.
Variables ¶
var Authorization_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Authorization", HandlerType: (*AuthorizationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSession", Handler: _Authorization_GetSession_Handler, }, { MethodName: "SetNewUnauthorizedSession", Handler: _Authorization_SetNewUnauthorizedSession_Handler, }, { MethodName: "SetNewAuthorizedSession", Handler: _Authorization_SetNewAuthorizedSession_Handler, }, { MethodName: "MakeSessionAuthorized", Handler: _Authorization_MakeSessionAuthorized_Handler, }, { MethodName: "MakeSessionUnauthorized", Handler: _Authorization_MakeSessionUnauthorized_Handler, }, { MethodName: "DeleteSession", Handler: _Authorization_DeleteSession_Handler, }, { MethodName: "IsSession", Handler: _Authorization_IsSession_Handler, }, { MethodName: "IsAuthSession", Handler: _Authorization_IsAuthSession_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/proto/auth.proto", }
Authorization_ServiceDesc is the grpc.ServiceDesc for Authorization 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_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthorizationServer ¶
func RegisterAuthorizationServer(s grpc.ServiceRegistrar, srv AuthorizationServer)
Types ¶
type AuthorizationClient ¶
type AuthorizationClient interface { GetSession(ctx context.Context, in *SessionId, opts ...grpc.CallOption) (*Session, error) SetNewAuthorizedSession(ctx context.Context, in *SetAuthSessionMsg, opts ...grpc.CallOption) (*SessionId, error) MakeSessionAuthorized(ctx context.Context, in *UserSessionId, opts ...grpc.CallOption) (*SessionId, error) DeleteSession(ctx context.Context, in *SessionId, opts ...grpc.CallOption) (*Empty, error) IsSession(ctx context.Context, in *SessionId, opts ...grpc.CallOption) (*BoolResult, error) IsAuthSession(ctx context.Context, in *SessionId, opts ...grpc.CallOption) (*BoolResult, error) }
AuthorizationClient is the client API for Authorization 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 NewAuthorizationClient ¶
func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient
type AuthorizationServer ¶
type AuthorizationServer interface { GetSession(context.Context, *SessionId) (*Session, error) SetNewAuthorizedSession(context.Context, *SetAuthSessionMsg) (*SessionId, error) MakeSessionAuthorized(context.Context, *UserSessionId) (*SessionId, error) DeleteSession(context.Context, *SessionId) (*Empty, error) IsSession(context.Context, *SessionId) (*BoolResult, error) IsAuthSession(context.Context, *SessionId) (*BoolResult, error) // contains filtered or unexported methods }
AuthorizationServer is the server API for Authorization service. All implementations must embed UnimplementedAuthorizationServer for forward compatibility
type BoolResult ¶
type BoolResult struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*BoolResult) Descriptor
deprecated
func (*BoolResult) Descriptor() ([]byte, []int)
Deprecated: Use BoolResult.ProtoReflect.Descriptor instead.
func (*BoolResult) GetResult ¶
func (x *BoolResult) GetResult() bool
func (*BoolResult) ProtoMessage ¶
func (*BoolResult) ProtoMessage()
func (*BoolResult) ProtoReflect ¶
func (x *BoolResult) ProtoReflect() protoreflect.Message
func (*BoolResult) Reset ¶
func (x *BoolResult) Reset()
func (*BoolResult) String ¶
func (x *BoolResult) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` IsAuthorized bool `protobuf:"varint,2,opt,name=is_authorized,json=isAuthorized,proto3" json:"is_authorized,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetIsAuthorized ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionId ¶
type SessionId struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // contains filtered or unexported fields }
func (*SessionId) Descriptor
deprecated
func (*SessionId) GetSessionId ¶
func (*SessionId) ProtoMessage ¶
func (*SessionId) ProtoMessage()
func (*SessionId) ProtoReflect ¶
func (x *SessionId) ProtoReflect() protoreflect.Message
type SetAuthSessionMsg ¶
type SetAuthSessionMsg struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Expires string `protobuf:"bytes,2,opt,name=expires,proto3" json:"expires,omitempty"` // contains filtered or unexported fields }
func (*SetAuthSessionMsg) Descriptor
deprecated
func (*SetAuthSessionMsg) Descriptor() ([]byte, []int)
Deprecated: Use SetAuthSessionMsg.ProtoReflect.Descriptor instead.
func (*SetAuthSessionMsg) GetExpires ¶
func (x *SetAuthSessionMsg) GetExpires() string
func (*SetAuthSessionMsg) GetUserId ¶
func (x *SetAuthSessionMsg) GetUserId() uint64
func (*SetAuthSessionMsg) ProtoMessage ¶
func (*SetAuthSessionMsg) ProtoMessage()
func (*SetAuthSessionMsg) ProtoReflect ¶
func (x *SetAuthSessionMsg) ProtoReflect() protoreflect.Message
func (*SetAuthSessionMsg) Reset ¶
func (x *SetAuthSessionMsg) Reset()
func (*SetAuthSessionMsg) String ¶
func (x *SetAuthSessionMsg) String() string
type SetUnauthSession ¶
type SetUnauthSession struct { Expires string `protobuf:"bytes,1,opt,name=expires,proto3" json:"expires,omitempty"` // contains filtered or unexported fields }
func (*SetUnauthSession) Descriptor
deprecated
func (*SetUnauthSession) Descriptor() ([]byte, []int)
Deprecated: Use SetUnauthSession.ProtoReflect.Descriptor instead.
func (*SetUnauthSession) GetExpires ¶
func (x *SetUnauthSession) GetExpires() string
func (*SetUnauthSession) ProtoMessage ¶
func (*SetUnauthSession) ProtoMessage()
func (*SetUnauthSession) ProtoReflect ¶
func (x *SetUnauthSession) ProtoReflect() protoreflect.Message
func (*SetUnauthSession) Reset ¶
func (x *SetUnauthSession) Reset()
func (*SetUnauthSession) String ¶
func (x *SetUnauthSession) String() string
type UnimplementedAuthorizationServer ¶
type UnimplementedAuthorizationServer struct { }
UnimplementedAuthorizationServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthorizationServer) DeleteSession ¶
func (UnimplementedAuthorizationServer) GetSession ¶
func (UnimplementedAuthorizationServer) IsAuthSession ¶
func (UnimplementedAuthorizationServer) IsAuthSession(context.Context, *SessionId) (*BoolResult, error)
func (UnimplementedAuthorizationServer) IsSession ¶
func (UnimplementedAuthorizationServer) IsSession(context.Context, *SessionId) (*BoolResult, error)
func (UnimplementedAuthorizationServer) MakeSessionAuthorized ¶
func (UnimplementedAuthorizationServer) MakeSessionAuthorized(context.Context, *UserSessionId) (*SessionId, error)
func (UnimplementedAuthorizationServer) MakeSessionUnauthorized ¶
func (UnimplementedAuthorizationServer) SetNewAuthorizedSession ¶
func (UnimplementedAuthorizationServer) SetNewAuthorizedSession(context.Context, *SetAuthSessionMsg) (*SessionId, error)
func (UnimplementedAuthorizationServer) SetNewUnauthorizedSession ¶
func (UnimplementedAuthorizationServer) SetNewUnauthorizedSession(context.Context, *SetUnauthSession) (*SessionId, error)
type UnsafeAuthorizationServer ¶
type UnsafeAuthorizationServer interface {
// contains filtered or unexported methods
}
UnsafeAuthorizationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizationServer will result in compilation errors.
type UserSessionId ¶
type UserSessionId struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserSessionId) Descriptor
deprecated
func (*UserSessionId) Descriptor() ([]byte, []int)
Deprecated: Use UserSessionId.ProtoReflect.Descriptor instead.
func (*UserSessionId) GetSessionId ¶
func (x *UserSessionId) GetSessionId() string
func (*UserSessionId) GetUserId ¶
func (x *UserSessionId) GetUserId() uint64
func (*UserSessionId) ProtoMessage ¶
func (*UserSessionId) ProtoMessage()
func (*UserSessionId) ProtoReflect ¶
func (x *UserSessionId) ProtoReflect() protoreflect.Message
func (*UserSessionId) Reset ¶
func (x *UserSessionId) Reset()
func (*UserSessionId) String ¶
func (x *UserSessionId) String() string