gus

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_CreateUser_FullMethodName   = "/gus.UserService/CreateUser"
	UserService_LoginUser_FullMethodName    = "/gus.UserService/LoginUser"
	UserService_UpdateUser_FullMethodName   = "/gus.UserService/UpdateUser"
	UserService_ActivateUser_FullMethodName = "/gus.UserService/ActivateUser"
	UserService_GetUser_FullMethodName      = "/gus.UserService/GetUser"
)

Variables

View Source
var File_rpc_activate_user_proto protoreflect.FileDescriptor
View Source
var File_rpc_create_user_proto protoreflect.FileDescriptor
View Source
var File_rpc_get_user_proto protoreflect.FileDescriptor
View Source
var File_rpc_login_user_proto protoreflect.FileDescriptor
View Source
var File_rpc_update_user_proto protoreflect.FileDescriptor
View Source
var File_service_user_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gus.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "LoginUser",
			Handler:    _UserService_LoginUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
		{
			MethodName: "ActivateUser",
			Handler:    _UserService_ActivateUser_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service_user_service.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type ActivateUserRequest

type ActivateUserRequest struct {
	ActivationToken string `protobuf:"bytes,1,opt,name=activationToken,proto3" json:"activationToken,omitempty"`
	UserId          string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivateUserRequest) Descriptor deprecated

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

Deprecated: Use ActivateUserRequest.ProtoReflect.Descriptor instead.

func (*ActivateUserRequest) GetActivationToken

func (x *ActivateUserRequest) GetActivationToken() string

func (*ActivateUserRequest) GetUserId

func (x *ActivateUserRequest) GetUserId() string

func (*ActivateUserRequest) ProtoMessage

func (*ActivateUserRequest) ProtoMessage()

func (*ActivateUserRequest) ProtoReflect

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

func (*ActivateUserRequest) Reset

func (x *ActivateUserRequest) Reset()

func (*ActivateUserRequest) String

func (x *ActivateUserRequest) String() string

type ActivateUserResponse

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

func (*ActivateUserResponse) Descriptor deprecated

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

Deprecated: Use ActivateUserResponse.ProtoReflect.Descriptor instead.

func (*ActivateUserResponse) GetMessage

func (x *ActivateUserResponse) GetMessage() string

func (*ActivateUserResponse) ProtoMessage

func (*ActivateUserResponse) ProtoMessage()

func (*ActivateUserResponse) ProtoReflect

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

func (*ActivateUserResponse) Reset

func (x *ActivateUserResponse) Reset()

func (*ActivateUserResponse) String

func (x *ActivateUserResponse) String() string

type CreateUserRequest

type CreateUserRequest struct {
	FullName        string   `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"`
	Email           string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Roles           []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
	Password        string   `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirm string   `protobuf:"bytes,5,opt,name=passwordConfirm,proto3" json:"passwordConfirm,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) GetFullName

func (x *CreateUserRequest) GetFullName() string

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetPasswordConfirm

func (x *CreateUserRequest) GetPasswordConfirm() string

func (*CreateUserRequest) GetRoles

func (x *CreateUserRequest) GetRoles() []string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type CreateUserResponse

type CreateUserResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetUser

func (x *CreateUserResponse) GetUser() *User

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type GetUserRequest

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

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type LoginUserRequest

type LoginUserRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginUserRequest) Descriptor deprecated

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

Deprecated: Use LoginUserRequest.ProtoReflect.Descriptor instead.

func (*LoginUserRequest) GetEmail

func (x *LoginUserRequest) GetEmail() string

func (*LoginUserRequest) GetPassword

func (x *LoginUserRequest) GetPassword() string

func (*LoginUserRequest) ProtoMessage

func (*LoginUserRequest) ProtoMessage()

func (*LoginUserRequest) ProtoReflect

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

func (*LoginUserRequest) Reset

func (x *LoginUserRequest) Reset()

func (*LoginUserRequest) String

func (x *LoginUserRequest) String() string

type LoginUserResponse

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

func (*LoginUserResponse) Descriptor deprecated

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

Deprecated: Use LoginUserResponse.ProtoReflect.Descriptor instead.

func (*LoginUserResponse) GetAccessToken

func (x *LoginUserResponse) GetAccessToken() string

func (*LoginUserResponse) ProtoMessage

func (*LoginUserResponse) ProtoMessage()

func (*LoginUserResponse) ProtoReflect

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

func (*LoginUserResponse) Reset

func (x *LoginUserResponse) Reset()

func (*LoginUserResponse) String

func (x *LoginUserResponse) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) ActivateUser

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) GetUser

func (UnimplementedUserServiceServer) LoginUser

func (UnimplementedUserServiceServer) UpdateUser

type UnsafeUserServiceServer

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

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

type UpdateUserRequest

type UpdateUserRequest struct {
	FullName           string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	Avatar             string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"`
	OldPassword        string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"`
	NewPassword        string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	ConfirmNewPassword string `protobuf:"bytes,5,opt,name=confirm_new_password,json=confirmNewPassword,proto3" json:"confirm_new_password,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetAvatar

func (x *UpdateUserRequest) GetAvatar() string

func (*UpdateUserRequest) GetConfirmNewPassword

func (x *UpdateUserRequest) GetConfirmNewPassword() string

func (*UpdateUserRequest) GetFullName

func (x *UpdateUserRequest) GetFullName() string

func (*UpdateUserRequest) GetNewPassword

func (x *UpdateUserRequest) GetNewPassword() string

func (*UpdateUserRequest) GetOldPassword

func (x *UpdateUserRequest) GetOldPassword() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type UpdateUserResponse

type UpdateUserResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserResponse) Descriptor deprecated

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

Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead.

func (*UpdateUserResponse) GetUser

func (x *UpdateUserResponse) GetUser() *User

func (*UpdateUserResponse) ProtoMessage

func (*UpdateUserResponse) ProtoMessage()

func (*UpdateUserResponse) ProtoReflect

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

func (*UpdateUserResponse) Reset

func (x *UpdateUserResponse) Reset()

func (*UpdateUserResponse) String

func (x *UpdateUserResponse) String() string

type User

type User struct {
	Id       string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FullName string   `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName,omitempty"`
	Email    string   `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Roles    []string `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"`
	// PasswordHash is excluded because it's private (json:"-")
	Activated   bool   `protobuf:"varint,5,opt,name=activated,proto3" json:"activated,omitempty"`
	DateCreated string `protobuf:"bytes,7,opt,name=dateCreated,proto3" json:"dateCreated,omitempty"`
	DateUpdated string `protobuf:"bytes,8,opt,name=dateUpdated,proto3" json:"dateUpdated,omitempty"`
	Avatar      string `protobuf:"bytes,9,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

AppUser represents information about an individual user.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetActivated

func (x *User) GetActivated() bool

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetDateCreated

func (x *User) GetDateCreated() string

func (*User) GetDateUpdated

func (x *User) GetDateUpdated() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFullName

func (x *User) GetFullName() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetRoles

func (x *User) GetRoles() []string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserServiceClient

type UserServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	LoginUser(ctx context.Context, in *LoginUserRequest, opts ...grpc.CallOption) (*LoginUserResponse, error)
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
	ActivateUser(ctx context.Context, in *ActivateUserRequest, opts ...grpc.CallOption) (*ActivateUserResponse, error)
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}

UserServiceClient is the client API for UserService 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 UserServiceServer

UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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