proto

package
v0.0.0-...-53ff5f4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Service_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Service_Login_Handler,
		},
		{
			MethodName: "PublicKey",
			Handler:    _Service_PublicKey_Handler,
		},
		{
			MethodName: "GetPermissionsForService",
			Handler:    _Service_GetPermissionsForService_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type AccessToken

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

func (*AccessToken) Descriptor deprecated

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

Deprecated: Use AccessToken.ProtoReflect.Descriptor instead.

func (*AccessToken) GetAccessToken

func (x *AccessToken) GetAccessToken() string

func (*AccessToken) ProtoMessage

func (*AccessToken) ProtoMessage()

func (*AccessToken) ProtoReflect

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

func (*AccessToken) Reset

func (x *AccessToken) Reset()

func (*AccessToken) String

func (x *AccessToken) String() string

type GetPermissionsForServiceRequest

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

func (*GetPermissionsForServiceRequest) Descriptor deprecated

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

Deprecated: Use GetPermissionsForServiceRequest.ProtoReflect.Descriptor instead.

func (*GetPermissionsForServiceRequest) GetName

func (*GetPermissionsForServiceRequest) ProtoMessage

func (*GetPermissionsForServiceRequest) ProtoMessage()

func (*GetPermissionsForServiceRequest) ProtoReflect

func (*GetPermissionsForServiceRequest) Reset

func (*GetPermissionsForServiceRequest) String

type GetPermissionsForServiceResponse

type GetPermissionsForServiceResponse struct {
	Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPermissionsForServiceResponse) Descriptor deprecated

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

Deprecated: Use GetPermissionsForServiceResponse.ProtoReflect.Descriptor instead.

func (*GetPermissionsForServiceResponse) GetPermissions

func (x *GetPermissionsForServiceResponse) GetPermissions() []*Permission

func (*GetPermissionsForServiceResponse) ProtoMessage

func (*GetPermissionsForServiceResponse) ProtoMessage()

func (*GetPermissionsForServiceResponse) ProtoReflect

func (*GetPermissionsForServiceResponse) Reset

func (*GetPermissionsForServiceResponse) String

type LoginRequest

type LoginRequest struct {
	Login    string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Service  string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetLogin

func (x *LoginRequest) GetLogin() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetService

func (x *LoginRequest) GetService() 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 *AccessToken `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() *AccessToken

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 Permission

type Permission struct {
	Id        uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Access    uint64 `protobuf:"varint,3,opt,name=access,proto3" json:"access,omitempty"`
	ServiceId uint32 `protobuf:"varint,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Permission) Descriptor deprecated

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

Deprecated: Use Permission.ProtoReflect.Descriptor instead.

func (*Permission) GetAccess

func (x *Permission) GetAccess() uint64

func (*Permission) GetId

func (x *Permission) GetId() uint32

func (*Permission) GetName

func (x *Permission) GetName() string

func (*Permission) GetServiceId

func (x *Permission) GetServiceId() uint32

func (*Permission) ProtoMessage

func (*Permission) ProtoMessage()

func (*Permission) ProtoReflect

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

func (*Permission) Reset

func (x *Permission) Reset()

func (*Permission) String

func (x *Permission) String() string

type PublicKeyRequest

type PublicKeyRequest struct {
	// contains filtered or unexported fields
}

func (*PublicKeyRequest) Descriptor deprecated

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

Deprecated: Use PublicKeyRequest.ProtoReflect.Descriptor instead.

func (*PublicKeyRequest) ProtoMessage

func (*PublicKeyRequest) ProtoMessage()

func (*PublicKeyRequest) ProtoReflect

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

func (*PublicKeyRequest) Reset

func (x *PublicKeyRequest) Reset()

func (*PublicKeyRequest) String

func (x *PublicKeyRequest) String() string

type PublicKeyResponse

type PublicKeyResponse struct {
	Pub []byte `protobuf:"bytes,1,opt,name=pub,proto3" json:"pub,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKeyResponse) Descriptor deprecated

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

Deprecated: Use PublicKeyResponse.ProtoReflect.Descriptor instead.

func (*PublicKeyResponse) GetPub

func (x *PublicKeyResponse) GetPub() []byte

func (*PublicKeyResponse) ProtoMessage

func (*PublicKeyResponse) ProtoMessage()

func (*PublicKeyResponse) ProtoReflect

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

func (*PublicKeyResponse) Reset

func (x *PublicKeyResponse) Reset()

func (*PublicKeyResponse) String

func (x *PublicKeyResponse) String() string

type RegisterRequest

type RegisterRequest struct {
	Login     string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	Password  string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Service   string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
	AccountId uint32 `protobuf:"varint,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAccountId

func (x *RegisterRequest) GetAccountId() uint32

func (*RegisterRequest) GetLogin

func (x *RegisterRequest) GetLogin() string

func (*RegisterRequest) GetPassword

func (x *RegisterRequest) GetPassword() string

func (*RegisterRequest) GetService

func (x *RegisterRequest) GetService() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

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

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetOk

func (x *RegisterResponse) GetOk() bool

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type ServiceClient

type ServiceClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	PublicKey(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PublicKeyResponse, error)
	GetPermissionsForService(ctx context.Context, in *GetPermissionsForServiceRequest, opts ...grpc.CallOption) (*GetPermissionsForServiceResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	PublicKey(context.Context, *emptypb.Empty) (*PublicKeyResponse, error)
	GetPermissionsForService(context.Context, *GetPermissionsForServiceRequest) (*GetPermissionsForServiceResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Login

func (UnimplementedServiceServer) PublicKey

func (UnimplementedServiceServer) Register

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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