auth

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth_CreateTokenFromId_FullMethodName = "/auth.Auth/CreateTokenFromId"
	Auth_GetIdFromToken_FullMethodName    = "/auth.Auth/GetIdFromToken"
)

Variables

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

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

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetValue added in v0.1.5

func (x *Id) GetValue() uint64

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

func (*Id) Reset added in v0.1.5

func (x *Id) Reset()

func (*Id) String added in v0.1.5

func (x *Id) String() string

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetValue added in v0.1.5

func (x *Token) GetValue() string

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

func (*Token) Reset added in v0.1.5

func (x *Token) Reset()

func (*Token) String added in v0.1.5

func (x *Token) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) CreateTokenFromId added in v0.1.5

func (UnimplementedAuthServer) CreateTokenFromId(context.Context, *Id) (*Token, error)

func (UnimplementedAuthServer) GetIdFromToken added in v0.1.5

func (UnimplementedAuthServer) GetIdFromToken(context.Context, *Token) (*Id, error)

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.

Jump to

Keyboard shortcuts

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