proto

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_token_info_proto protoreflect.FileDescriptor
View Source
var TokenInfo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.TokenInfo",
	HandlerType: (*TokenInfoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "VerifyToken",
			Handler:    _TokenInfo_VerifyToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "token-info.proto",
}

TokenInfo_ServiceDesc is the grpc.ServiceDesc for TokenInfo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTokenInfoServer

func RegisterTokenInfoServer(s grpc.ServiceRegistrar, srv TokenInfoServer)

Types

type TokenInfoClient

type TokenInfoClient interface {
	VerifyToken(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error)
}

TokenInfoClient is the client API for TokenInfo 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 NewTokenInfoClient

func NewTokenInfoClient(cc grpc.ClientConnInterface) TokenInfoClient

type TokenInfoServer

type TokenInfoServer interface {
	VerifyToken(context.Context, *VerifyRequest) (*VerifyResponse, error)
	// contains filtered or unexported methods
}

TokenInfoServer is the server API for TokenInfo service. All implementations must embed UnimplementedTokenInfoServer for forward compatibility

type UnimplementedTokenInfoServer added in v0.3.4

type UnimplementedTokenInfoServer struct {
}

UnimplementedTokenInfoServer must be embedded to have forward compatible implementations.

func (UnimplementedTokenInfoServer) VerifyToken added in v0.3.4

type UnsafeTokenInfoServer added in v0.3.4

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

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

type VerifyRequest

type VerifyRequest struct {
	Token  string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Params []string `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyRequest) Descriptor deprecated

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

Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.

func (*VerifyRequest) GetParams

func (x *VerifyRequest) GetParams() []string

func (*VerifyRequest) GetToken

func (x *VerifyRequest) GetToken() string

func (*VerifyRequest) ProtoMessage

func (*VerifyRequest) ProtoMessage()

func (*VerifyRequest) ProtoReflect added in v0.3.4

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

func (*VerifyRequest) Reset

func (x *VerifyRequest) Reset()

func (*VerifyRequest) String

func (x *VerifyRequest) String() string

type VerifyResponse

type VerifyResponse struct {
	Success bool  `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Status  int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyResponse) Descriptor deprecated

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

Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.

func (*VerifyResponse) GetStatus

func (x *VerifyResponse) GetStatus() int32

func (*VerifyResponse) GetSuccess

func (x *VerifyResponse) GetSuccess() bool

func (*VerifyResponse) ProtoMessage

func (*VerifyResponse) ProtoMessage()

func (*VerifyResponse) ProtoReflect added in v0.3.4

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

func (*VerifyResponse) Reset

func (x *VerifyResponse) Reset()

func (*VerifyResponse) String

func (x *VerifyResponse) String() string

Jump to

Keyboard shortcuts

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