user

package
v0.0.0-...-6c3add7 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessLevel_name = map[int32]string{
		0: "BASE",
		1: "DEFAULT",
		2: "STAFF",
		3: "MANAGER",
		4: "ADMIN",
	}
	AccessLevel_value = map[string]int32{
		"BASE":    0,
		"DEFAULT": 1,
		"STAFF":   2,
		"MANAGER": 3,
		"ADMIN":   4,
	}
)

Enum value maps for AccessLevel.

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserByID",
			Handler:    _User_GetUserByID_Handler,
		},
		{
			MethodName: "GetUserByUN",
			Handler:    _User_GetUserByUN_Handler,
		},
		{
			MethodName: "GetAccess",
			Handler:    _User_GetAccess_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _User_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.proto",
}

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

Functions

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type AccessLevel

type AccessLevel int32
const (
	AccessLevel_BASE    AccessLevel = 0
	AccessLevel_DEFAULT AccessLevel = 1
	AccessLevel_STAFF   AccessLevel = 2
	AccessLevel_MANAGER AccessLevel = 3
	AccessLevel_ADMIN   AccessLevel = 4
)

func (AccessLevel) Descriptor

func (AccessLevel) Enum

func (x AccessLevel) Enum() *AccessLevel

func (AccessLevel) EnumDescriptor deprecated

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

Deprecated: Use AccessLevel.Descriptor instead.

func (AccessLevel) Number

func (x AccessLevel) Number() protoreflect.EnumNumber

func (AccessLevel) String

func (x AccessLevel) String() string

func (AccessLevel) Type

type AccessResponse

type AccessResponse struct {
	AccessLevel AccessLevel `protobuf:"varint,1,opt,name=AccessLevel,proto3,enum=AccessLevel" json:"AccessLevel,omitempty"`
	Location    string      `protobuf:"bytes,2,opt,name=Location,proto3" json:"Location,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessResponse) Descriptor deprecated

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

Deprecated: Use AccessResponse.ProtoReflect.Descriptor instead.

func (*AccessResponse) GetAccessLevel

func (x *AccessResponse) GetAccessLevel() AccessLevel

func (*AccessResponse) GetLocation

func (x *AccessResponse) GetLocation() string

func (*AccessResponse) ProtoMessage

func (*AccessResponse) ProtoMessage()

func (*AccessResponse) ProtoReflect

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

func (*AccessResponse) Reset

func (x *AccessResponse) Reset()

func (*AccessResponse) String

func (x *AccessResponse) String() string

type AuthsRequest

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

func (*AuthsRequest) Descriptor deprecated

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

Deprecated: Use AuthsRequest.ProtoReflect.Descriptor instead.

func (*AuthsRequest) GetPass

func (x *AuthsRequest) GetPass() string

func (*AuthsRequest) GetUsername

func (x *AuthsRequest) GetUsername() string

func (*AuthsRequest) ProtoMessage

func (*AuthsRequest) ProtoMessage()

func (*AuthsRequest) ProtoReflect

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

func (*AuthsRequest) Reset

func (x *AuthsRequest) Reset()

func (*AuthsRequest) String

func (x *AuthsRequest) String() string

type IDUserRequest

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

func (*IDUserRequest) Descriptor deprecated

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

Deprecated: Use IDUserRequest.ProtoReflect.Descriptor instead.

func (*IDUserRequest) GetID

func (x *IDUserRequest) GetID() string

func (*IDUserRequest) ProtoMessage

func (*IDUserRequest) ProtoMessage()

func (*IDUserRequest) ProtoReflect

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

func (*IDUserRequest) Reset

func (x *IDUserRequest) Reset()

func (*IDUserRequest) String

func (x *IDUserRequest) String() string

type UNUserRequest

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

func (*UNUserRequest) Descriptor deprecated

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

Deprecated: Use UNUserRequest.ProtoReflect.Descriptor instead.

func (*UNUserRequest) GetUsername

func (x *UNUserRequest) GetUsername() string

func (*UNUserRequest) ProtoMessage

func (*UNUserRequest) ProtoMessage()

func (*UNUserRequest) ProtoReflect

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

func (*UNUserRequest) Reset

func (x *UNUserRequest) Reset()

func (*UNUserRequest) String

func (x *UNUserRequest) String() string

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServer) GetAccess

func (UnimplementedUserServer) GetUserByID

func (UnimplementedUserServer) GetUserByUN

func (UnimplementedUserServer) Login

type UnsafeUserServer

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

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

type UserClient

type UserClient interface {
	GetUserByID(ctx context.Context, in *IDUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
	GetUserByUN(ctx context.Context, in *UNUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
	GetAccess(ctx context.Context, in *IDUserRequest, opts ...grpc.CallOption) (*AccessResponse, error)
	Login(ctx context.Context, in *AuthsRequest, opts ...grpc.CallOption) (*AccessResponse, error)
}

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserResponse

type UserResponse struct {
	ID          string      `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name        string      `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Username    string      `protobuf:"bytes,3,opt,name=Username,proto3" json:"Username,omitempty"`
	AccessLevel AccessLevel `protobuf:"varint,4,opt,name=AccessLevel,proto3,enum=AccessLevel" json:"AccessLevel,omitempty"`
	Location    string      `protobuf:"bytes,5,opt,name=Location,proto3" json:"Location,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetAccessLevel

func (x *UserResponse) GetAccessLevel() AccessLevel

func (*UserResponse) GetID

func (x *UserResponse) GetID() string

func (*UserResponse) GetLocation

func (x *UserResponse) GetLocation() string

func (*UserResponse) GetName

func (x *UserResponse) GetName() string

func (*UserResponse) GetUsername

func (x *UserResponse) GetUsername() string

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type UserServer

UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility

Jump to

Keyboard shortcuts

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