auth

package
v0.0.0-...-b044b52 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthService_Login_FullMethodName = "/auth.AuthService/Login"
)

Variables

View Source
var (
	SecretType_name = map[int32]string{
		0: "Unknown",
		1: "Password",
		2: "Github",
	}
	SecretType_value = map[string]int32{
		"Unknown":  0,
		"Password": 1,
		"Github":   2,
	}
)

Enum value maps for SecretType.

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gateway/api/auth/auth.proto",
}

AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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_gateway_api_auth_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
}

AuthServiceClient is the client API for AuthService 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 AuthServiceServer

type AuthServiceServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type LoginRequest

type LoginRequest struct {
	Secret     []byte     `protobuf:"bytes,1,opt,name=Secret,proto3" json:"Secret,omitempty"`
	SecretType SecretType `protobuf:"varint,2,opt,name=secretType,proto3,enum=auth.SecretType" json:"secretType,omitempty"`
	User       string     `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetSecret

func (x *LoginRequest) GetSecret() []byte

func (*LoginRequest) GetSecretType

func (x *LoginRequest) GetSecretType() SecretType

func (*LoginRequest) GetUser

func (x *LoginRequest) GetUser() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

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

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type SecretType

type SecretType int32
const (
	SecretType_Unknown  SecretType = 0
	SecretType_Password SecretType = 1
	SecretType_Github   SecretType = 2
)

func (SecretType) Descriptor

func (SecretType) Descriptor() protoreflect.EnumDescriptor

func (SecretType) Enum

func (x SecretType) Enum() *SecretType

func (SecretType) EnumDescriptor deprecated

func (SecretType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SecretType.Descriptor instead.

func (SecretType) Number

func (x SecretType) Number() protoreflect.EnumNumber

func (SecretType) String

func (x SecretType) String() string

func (SecretType) Type

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) Login

type UnsafeAuthServiceServer

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

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

Jump to

Keyboard shortcuts

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