user

package
v0.0.0-...-0b10f05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _User_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _User_Logout_Handler,
		},
		{
			MethodName: "GetUserData",
			Handler:    _User_GetUserData_Handler,
		},
		{
			MethodName: "AddGroups",
			Handler:    _User_AddGroups_Handler,
		},
		{
			MethodName: "AddPermissions",
			Handler:    _User_AddPermissions_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 AddGroupsRequest

type AddGroupsRequest struct {
	Groups []string `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*AddGroupsRequest) Descriptor deprecated

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

Deprecated: Use AddGroupsRequest.ProtoReflect.Descriptor instead.

func (*AddGroupsRequest) GetGroups

func (x *AddGroupsRequest) GetGroups() []string

func (*AddGroupsRequest) ProtoMessage

func (*AddGroupsRequest) ProtoMessage()

func (*AddGroupsRequest) ProtoReflect

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

func (*AddGroupsRequest) Reset

func (x *AddGroupsRequest) Reset()

func (*AddGroupsRequest) String

func (x *AddGroupsRequest) String() string

type AddGroupsResponse

type AddGroupsResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*AddGroupsResponse) Descriptor deprecated

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

Deprecated: Use AddGroupsResponse.ProtoReflect.Descriptor instead.

func (*AddGroupsResponse) GetErrorMessage

func (x *AddGroupsResponse) GetErrorMessage() string

func (*AddGroupsResponse) GetSuccess

func (x *AddGroupsResponse) GetSuccess() bool

func (*AddGroupsResponse) ProtoMessage

func (*AddGroupsResponse) ProtoMessage()

func (*AddGroupsResponse) ProtoReflect

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

func (*AddGroupsResponse) Reset

func (x *AddGroupsResponse) Reset()

func (*AddGroupsResponse) String

func (x *AddGroupsResponse) String() string

type AddPermissionsRequest

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

func (*AddPermissionsRequest) Descriptor deprecated

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

Deprecated: Use AddPermissionsRequest.ProtoReflect.Descriptor instead.

func (*AddPermissionsRequest) GetPermissions

func (x *AddPermissionsRequest) GetPermissions() []string

func (*AddPermissionsRequest) ProtoMessage

func (*AddPermissionsRequest) ProtoMessage()

func (*AddPermissionsRequest) ProtoReflect

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

func (*AddPermissionsRequest) Reset

func (x *AddPermissionsRequest) Reset()

func (*AddPermissionsRequest) String

func (x *AddPermissionsRequest) String() string

type AddPermissionsResponse

type AddPermissionsResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPermissionsResponse) Descriptor deprecated

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

Deprecated: Use AddPermissionsResponse.ProtoReflect.Descriptor instead.

func (*AddPermissionsResponse) GetErrorMessage

func (x *AddPermissionsResponse) GetErrorMessage() string

func (*AddPermissionsResponse) GetSuccess

func (x *AddPermissionsResponse) GetSuccess() bool

func (*AddPermissionsResponse) ProtoMessage

func (*AddPermissionsResponse) ProtoMessage()

func (*AddPermissionsResponse) ProtoReflect

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

func (*AddPermissionsResponse) Reset

func (x *AddPermissionsResponse) Reset()

func (*AddPermissionsResponse) String

func (x *AddPermissionsResponse) String() string

type GetUserDataRequest

type GetUserDataRequest struct {
	SessionToken string `protobuf:"bytes,1,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	IpAddress    string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserDataRequest) Descriptor deprecated

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

Deprecated: Use GetUserDataRequest.ProtoReflect.Descriptor instead.

func (*GetUserDataRequest) GetIpAddress

func (x *GetUserDataRequest) GetIpAddress() string

func (*GetUserDataRequest) GetSessionToken

func (x *GetUserDataRequest) GetSessionToken() string

func (*GetUserDataRequest) ProtoMessage

func (*GetUserDataRequest) ProtoMessage()

func (*GetUserDataRequest) ProtoReflect

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

func (*GetUserDataRequest) Reset

func (x *GetUserDataRequest) Reset()

func (*GetUserDataRequest) String

func (x *GetUserDataRequest) String() string

type LoginRequest

type LoginRequest struct {
	Username   string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password   string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	IpAddress  string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	ExpiryTime int64  `protobuf:"varint,4,opt,name=expiryTime,proto3" json:"expiryTime,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetExpiryTime

func (x *LoginRequest) GetExpiryTime() int64

func (*LoginRequest) GetIpAddress

func (x *LoginRequest) GetIpAddress() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() 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 {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	SessionToken string `protobuf:"bytes,4,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetErrorMessage

func (x *LoginResponse) GetErrorMessage() string

func (*LoginResponse) GetSessionToken

func (x *LoginResponse) GetSessionToken() string

func (*LoginResponse) GetSuccess

func (x *LoginResponse) GetSuccess() bool

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 LogoutRequest

type LogoutRequest struct {
	SessionToken string `protobuf:"bytes,1,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	IpAddress    string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) GetIpAddress

func (x *LogoutRequest) GetIpAddress() string

func (*LogoutRequest) GetSessionToken

func (x *LogoutRequest) GetSessionToken() string

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

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

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

type LogoutResponse

type LogoutResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*LogoutResponse) Descriptor deprecated

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

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) GetErrorMessage

func (x *LogoutResponse) GetErrorMessage() string

func (*LogoutResponse) GetSuccess

func (x *LogoutResponse) GetSuccess() bool

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

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

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) AddGroups

func (UnimplementedUserServer) AddPermissions

func (UnimplementedUserServer) GetUserData

func (UnimplementedUserServer) Login

func (UnimplementedUserServer) Logout

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 {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
	GetUserData(ctx context.Context, in *GetUserDataRequest, opts ...grpc.CallOption) (*UserDataResponse, error)
	AddGroups(ctx context.Context, in *AddGroupsRequest, opts ...grpc.CallOption) (*AddGroupsResponse, error)
	AddPermissions(ctx context.Context, in *AddPermissionsRequest, opts ...grpc.CallOption) (*AddPermissionsResponse, 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 UserDataResponse

type UserDataResponse struct {
	Success      bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string   `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	UserId       uint64   `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Name         string   `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"`
	Icon         string   `protobuf:"bytes,5,opt,name=Icon,proto3" json:"Icon,omitempty"`
	IsAdmin      bool     `protobuf:"varint,6,opt,name=IsAdmin,proto3" json:"IsAdmin,omitempty"`
	Permissions  []string `protobuf:"bytes,7,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDataResponse) Descriptor deprecated

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

Deprecated: Use UserDataResponse.ProtoReflect.Descriptor instead.

func (*UserDataResponse) GetErrorMessage

func (x *UserDataResponse) GetErrorMessage() string

func (*UserDataResponse) GetIcon

func (x *UserDataResponse) GetIcon() string

func (*UserDataResponse) GetIsAdmin

func (x *UserDataResponse) GetIsAdmin() bool

func (*UserDataResponse) GetName

func (x *UserDataResponse) GetName() string

func (*UserDataResponse) GetPermissions

func (x *UserDataResponse) GetPermissions() []string

func (*UserDataResponse) GetSuccess

func (x *UserDataResponse) GetSuccess() bool

func (*UserDataResponse) GetUserId

func (x *UserDataResponse) GetUserId() uint64

func (*UserDataResponse) ProtoMessage

func (*UserDataResponse) ProtoMessage()

func (*UserDataResponse) ProtoReflect

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

func (*UserDataResponse) Reset

func (x *UserDataResponse) Reset()

func (*UserDataResponse) String

func (x *UserDataResponse) String() string

type UserServer

type UserServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	GetUserData(context.Context, *GetUserDataRequest) (*UserDataResponse, error)
	AddGroups(context.Context, *AddGroupsRequest) (*AddGroupsResponse, error)
	AddPermissions(context.Context, *AddPermissionsRequest) (*AddPermissionsResponse, error)
	// contains filtered or unexported methods
}

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

Jump to

Keyboard shortcuts

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