appProto

package
v1.19.25 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	App_GetTokenStatus_FullMethodName      = "/appProto.App/GetTokenStatus"
	App_WatchTokenOperation_FullMethodName = "/appProto.App/WatchTokenOperation"
	App_RefreshToken_FullMethodName        = "/appProto.App/RefreshToken"
	App_DestroyToken_FullMethodName        = "/appProto.App/DestroyToken"
	App_GetUserInfo_FullMethodName         = "/appProto.App/GetUserInfo"
)

Variables

View Source
var App_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "appProto.App",
	HandlerType: (*AppServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTokenStatus",
			Handler:    _App_GetTokenStatus_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _App_RefreshToken_Handler,
		},
		{
			MethodName: "DestroyToken",
			Handler:    _App_DestroyToken_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _App_GetUserInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchTokenOperation",
			Handler:       _App_WatchTokenOperation_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "protos/app.proto",
}

App_ServiceDesc is the grpc.ServiceDesc for App 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_protos_app_proto protoreflect.FileDescriptor

Functions

func RegisterAppServer

func RegisterAppServer(s grpc.ServiceRegistrar, srv AppServer)

Types

type AccessToken added in v1.19.25

type AccessToken struct {
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	Payload     string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessToken) Descriptor deprecated added in v1.19.25

func (*AccessToken) Descriptor() ([]byte, []int)

Deprecated: Use AccessToken.ProtoReflect.Descriptor instead.

func (*AccessToken) GetAccessToken added in v1.19.25

func (x *AccessToken) GetAccessToken() string

func (*AccessToken) GetPayload added in v1.19.25

func (x *AccessToken) GetPayload() string

func (*AccessToken) ProtoMessage added in v1.19.25

func (*AccessToken) ProtoMessage()

func (*AccessToken) ProtoReflect added in v1.19.25

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

func (*AccessToken) Reset added in v1.19.25

func (x *AccessToken) Reset()

func (*AccessToken) String added in v1.19.25

func (x *AccessToken) String() string

type AppClient

type AppClient interface {
	GetTokenStatus(ctx context.Context, in *TokenIDRequest, opts ...grpc.CallOption) (*TokenStatus, error)
	WatchTokenOperation(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (App_WatchTokenOperationClient, error)
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AccessToken, error)
	DestroyToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetUserInfo(ctx context.Context, in *UserIDRequest, opts ...grpc.CallOption) (*UserInfo, error)
}

AppClient is the client API for App 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 NewAppClient

func NewAppClient(cc grpc.ClientConnInterface) AppClient

type AppServer

type AppServer interface {
	GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error)
	WatchTokenOperation(*emptypb.Empty, App_WatchTokenOperationServer) error
	RefreshToken(context.Context, *RefreshTokenRequest) (*AccessToken, error)
	DestroyToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error)
	GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error)
	// contains filtered or unexported methods
}

AppServer is the server API for App service. All implementations must embed UnimplementedAppServer for forward compatibility

type App_WatchTokenOperationClient added in v1.19.19

type App_WatchTokenOperationClient interface {
	Recv() (*TokenOperation, error)
	grpc.ClientStream
}

type App_WatchTokenOperationServer added in v1.19.19

type App_WatchTokenOperationServer interface {
	Send(*TokenOperation) error
	grpc.ServerStream
}

type CanceledToken added in v1.19.23

type CanceledToken struct {
	Id          uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ValidBefore int64  `protobuf:"varint,2,opt,name=valid_before,json=validBefore,proto3" json:"valid_before,omitempty"`
	// contains filtered or unexported fields
}

func (*CanceledToken) Descriptor deprecated added in v1.19.23

func (*CanceledToken) Descriptor() ([]byte, []int)

Deprecated: Use CanceledToken.ProtoReflect.Descriptor instead.

func (*CanceledToken) GetId added in v1.19.23

func (x *CanceledToken) GetId() uint64

func (*CanceledToken) GetValidBefore added in v1.19.23

func (x *CanceledToken) GetValidBefore() int64

func (*CanceledToken) ProtoMessage added in v1.19.23

func (*CanceledToken) ProtoMessage()

func (*CanceledToken) ProtoReflect added in v1.19.23

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

func (*CanceledToken) Reset added in v1.19.23

func (x *CanceledToken) Reset()

func (*CanceledToken) String added in v1.19.23

func (x *CanceledToken) String() string

type RefreshTokenRequest added in v1.19.14

type RefreshTokenRequest struct {
	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenRequest) Descriptor deprecated added in v1.19.14

func (*RefreshTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokenRequest) GetToken added in v1.19.14

func (x *RefreshTokenRequest) GetToken() string

func (*RefreshTokenRequest) ProtoMessage added in v1.19.14

func (*RefreshTokenRequest) ProtoMessage()

func (*RefreshTokenRequest) ProtoReflect added in v1.19.14

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

func (*RefreshTokenRequest) Reset added in v1.19.14

func (x *RefreshTokenRequest) Reset()

func (*RefreshTokenRequest) String added in v1.19.14

func (x *RefreshTokenRequest) String() string

type TokenIDRequest added in v1.19.14

type TokenIDRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenIDRequest) Descriptor deprecated added in v1.19.14

func (*TokenIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use TokenIDRequest.ProtoReflect.Descriptor instead.

func (*TokenIDRequest) GetId added in v1.19.14

func (x *TokenIDRequest) GetId() uint64

func (*TokenIDRequest) ProtoMessage added in v1.19.14

func (*TokenIDRequest) ProtoMessage()

func (*TokenIDRequest) ProtoReflect added in v1.19.14

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

func (*TokenIDRequest) Reset added in v1.19.14

func (x *TokenIDRequest) Reset()

func (*TokenIDRequest) String added in v1.19.14

func (x *TokenIDRequest) String() string

type TokenOperation added in v1.19.19

type TokenOperation struct {
	UserOperation []*UserOperationID `protobuf:"bytes,1,rep,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"`
	CanceledToken []*CanceledToken   `protobuf:"bytes,2,rep,name=canceled_token,json=canceledToken,proto3" json:"canceled_token,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenOperation) Descriptor deprecated added in v1.19.19

func (*TokenOperation) Descriptor() ([]byte, []int)

Deprecated: Use TokenOperation.ProtoReflect.Descriptor instead.

func (*TokenOperation) GetCanceledToken added in v1.19.23

func (x *TokenOperation) GetCanceledToken() []*CanceledToken

func (*TokenOperation) GetUserOperation added in v1.19.19

func (x *TokenOperation) GetUserOperation() []*UserOperationID

func (*TokenOperation) ProtoMessage added in v1.19.19

func (*TokenOperation) ProtoMessage()

func (*TokenOperation) ProtoReflect added in v1.19.19

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

func (*TokenOperation) Reset added in v1.19.19

func (x *TokenOperation) Reset()

func (*TokenOperation) String added in v1.19.19

func (x *TokenOperation) String() string

type TokenStatus

type TokenStatus struct {
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenStatus) Descriptor deprecated

func (*TokenStatus) Descriptor() ([]byte, []int)

Deprecated: Use TokenStatus.ProtoReflect.Descriptor instead.

func (*TokenStatus) GetValid

func (x *TokenStatus) GetValid() bool

func (*TokenStatus) ProtoMessage

func (*TokenStatus) ProtoMessage()

func (*TokenStatus) ProtoReflect

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

func (*TokenStatus) Reset

func (x *TokenStatus) Reset()

func (*TokenStatus) String

func (x *TokenStatus) String() string

type UnimplementedAppServer

type UnimplementedAppServer struct {
}

UnimplementedAppServer must be embedded to have forward compatible implementations.

func (UnimplementedAppServer) DestroyToken

func (UnimplementedAppServer) GetTokenStatus

func (UnimplementedAppServer) GetUserInfo

func (UnimplementedAppServer) RefreshToken added in v1.19.25

func (UnimplementedAppServer) WatchTokenOperation added in v1.19.19

type UnsafeAppServer

type UnsafeAppServer interface {
	// contains filtered or unexported methods
}

UnsafeAppServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AppServer will result in compilation errors.

type UserIDRequest added in v1.19.14

type UserIDRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserIDRequest) Descriptor deprecated added in v1.19.14

func (*UserIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserIDRequest.ProtoReflect.Descriptor instead.

func (*UserIDRequest) GetId added in v1.19.14

func (x *UserIDRequest) GetId() uint64

func (*UserIDRequest) ProtoMessage added in v1.19.14

func (*UserIDRequest) ProtoMessage()

func (*UserIDRequest) ProtoReflect added in v1.19.14

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

func (*UserIDRequest) Reset added in v1.19.14

func (x *UserIDRequest) Reset()

func (*UserIDRequest) String added in v1.19.14

func (x *UserIDRequest) String() string

type UserInfo

type UserInfo struct {
	Uid       uint64   `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Name      string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	AvatarUrl string   `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	Groups    []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

func (*UserInfo) Descriptor() ([]byte, []int)

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetAvatarUrl

func (x *UserInfo) GetAvatarUrl() string

func (*UserInfo) GetGroups

func (x *UserInfo) GetGroups() []string

func (*UserInfo) GetName

func (x *UserInfo) GetName() string

func (*UserInfo) GetUid

func (x *UserInfo) GetUid() uint64

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

type UserOperationID added in v1.19.19

type UserOperationID struct {
	Uid         uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	OperationId uint64 `protobuf:"varint,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserOperationID) Descriptor deprecated added in v1.19.19

func (*UserOperationID) Descriptor() ([]byte, []int)

Deprecated: Use UserOperationID.ProtoReflect.Descriptor instead.

func (*UserOperationID) GetOperationId added in v1.19.19

func (x *UserOperationID) GetOperationId() uint64

func (*UserOperationID) GetUid added in v1.19.19

func (x *UserOperationID) GetUid() uint64

func (*UserOperationID) ProtoMessage added in v1.19.19

func (*UserOperationID) ProtoMessage()

func (*UserOperationID) ProtoReflect added in v1.19.19

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

func (*UserOperationID) Reset added in v1.19.19

func (x *UserOperationID) Reset()

func (*UserOperationID) String added in v1.19.19

func (x *UserOperationID) String() string

Jump to

Keyboard shortcuts

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