proto

package
v0.0.0-...-704a905 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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)
	SetNewUnauthorizedSession(ctx context.Context, in *SetUnauthSession, opts ...grpc.CallOption) (*SessionId, error)
	SetNewAuthorizedSession(ctx context.Context, in *SetAuthSessionMsg, opts ...grpc.CallOption) (*SessionId, error)
	MakeSessionAuthorized(ctx context.Context, in *UserSessionId, opts ...grpc.CallOption) (*SessionId, error)
	MakeSessionUnauthorized(ctx context.Context, in *SessionId, 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.

type AuthorizationServer

type AuthorizationServer interface {
	GetSession(context.Context, *SessionId) (*Session, error)
	SetNewUnauthorizedSession(context.Context, *SetUnauthSession) (*SessionId, error)
	SetNewAuthorizedSession(context.Context, *SetAuthSessionMsg) (*SessionId, error)
	MakeSessionAuthorized(context.Context, *UserSessionId) (*SessionId, error)
	MakeSessionUnauthorized(context.Context, *SessionId) (*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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetIsAuthorized

func (x *Session) GetIsAuthorized() bool

func (*Session) GetUserId

func (x *Session) GetUserId() uint64

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

func (x *Session) ProtoReflect() protoreflect.Message

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use SessionId.ProtoReflect.Descriptor instead.

func (*SessionId) GetSessionId

func (x *SessionId) GetSessionId() string

func (*SessionId) ProtoMessage

func (*SessionId) ProtoMessage()

func (*SessionId) ProtoReflect

func (x *SessionId) ProtoReflect() protoreflect.Message

func (*SessionId) Reset

func (x *SessionId) Reset()

func (*SessionId) String

func (x *SessionId) String() string

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) IsSession

func (UnimplementedAuthorizationServer) MakeSessionAuthorized

func (UnimplementedAuthorizationServer) MakeSessionUnauthorized

func (UnimplementedAuthorizationServer) SetNewAuthorizedSession

func (UnimplementedAuthorizationServer) SetNewUnauthorizedSession

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL