Documentation ¶
Index ¶
Constants ¶
const ( Auth_CreateTokenFromId_FullMethodName = "/auth.Auth/CreateTokenFromId" Auth_GetIdFromToken_FullMethodName = "/auth.Auth/GetIdFromToken" )
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateTokenFromId", Handler: _Auth_CreateTokenFromId_Handler, }, { MethodName: "GetIdFromToken", Handler: _Auth_GetIdFromToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.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_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { CreateTokenFromId(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Token, error) GetIdFromToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Id, 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 { CreateTokenFromId(context.Context, *Id) (*Token, error) GetIdFromToken(context.Context, *Token) (*Id, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type Id ¶ added in v0.1.5
type Id struct { Value uint64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*Id) Descriptor
deprecated
added in
v0.1.5
func (*Id) ProtoMessage ¶ added in v0.1.5
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶ added in v0.1.5
func (x *Id) ProtoReflect() protoreflect.Message
type Token ¶ added in v0.1.5
type Token struct { Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
added in
v0.1.5
func (*Token) ProtoMessage ¶ added in v0.1.5
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶ added in v0.1.5
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) CreateTokenFromId ¶ added in v0.1.5
func (UnimplementedAuthServer) GetIdFromToken ¶ added in v0.1.5
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.