Documentation
¶
Index ¶
- Variables
- func RegisterUsersServer(s *grpc.Server, srv UsersServer)
- type ChangeUserPasswordRequest
- func (*ChangeUserPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeUserPasswordRequest) GetNewPassword() string
- func (x *ChangeUserPasswordRequest) GetUsername() string
- func (*ChangeUserPasswordRequest) ProtoMessage()
- func (x *ChangeUserPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ChangeUserPasswordRequest) Reset()
- func (x *ChangeUserPasswordRequest) String() string
- type ChangeUserPasswordResponse
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type DeleteUserRequest
- type DeleteUserResponse
- type UnimplementedUsersServer
- func (*UnimplementedUsersServer) ChangeUserPassword(context.Context, *ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
- func (*UnimplementedUsersServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (*UnimplementedUsersServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
- type UsersClient
- type UsersServer
Constants ¶
This section is empty.
Variables ¶
var File_users_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s *grpc.Server, srv UsersServer)
Types ¶
type ChangeUserPasswordRequest ¶
type ChangeUserPasswordRequest struct {
// username is the name of the user to whom we want to change the password.
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// new_password is the new desired password.
NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
// contains filtered or unexported fields
}
ChangeUserPasswordRequest is the parameter message for ChangeUserPassword rpc.
func (*ChangeUserPasswordRequest) Descriptor
deprecated
func (*ChangeUserPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangeUserPasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangeUserPasswordRequest) GetNewPassword ¶
func (x *ChangeUserPasswordRequest) GetNewPassword() string
func (*ChangeUserPasswordRequest) GetUsername ¶
func (x *ChangeUserPasswordRequest) GetUsername() string
func (*ChangeUserPasswordRequest) ProtoMessage ¶
func (*ChangeUserPasswordRequest) ProtoMessage()
func (*ChangeUserPasswordRequest) ProtoReflect ¶
func (x *ChangeUserPasswordRequest) ProtoReflect() protoreflect.Message
func (*ChangeUserPasswordRequest) Reset ¶
func (x *ChangeUserPasswordRequest) Reset()
func (*ChangeUserPasswordRequest) String ¶
func (x *ChangeUserPasswordRequest) String() string
type ChangeUserPasswordResponse ¶
type ChangeUserPasswordResponse struct {
// contains filtered or unexported fields
}
ChangePasswordResponse is the response returned by ChangeUserPassword rpc.
func (*ChangeUserPasswordResponse) Descriptor
deprecated
func (*ChangeUserPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChangeUserPasswordResponse.ProtoReflect.Descriptor instead.
func (*ChangeUserPasswordResponse) ProtoMessage ¶
func (*ChangeUserPasswordResponse) ProtoMessage()
func (*ChangeUserPasswordResponse) ProtoReflect ¶
func (x *ChangeUserPasswordResponse) ProtoReflect() protoreflect.Message
func (*ChangeUserPasswordResponse) Reset ¶
func (x *ChangeUserPasswordResponse) Reset()
func (*ChangeUserPasswordResponse) String ¶
func (x *ChangeUserPasswordResponse) String() string
type CreateUserRequest ¶
type CreateUserRequest struct {
// username defines new created user name.
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// password is the user desired password.
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
CreateUserRequest is the parameter message for CreateUser rpc.
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() 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 {
// contains filtered or unexported fields
}
CreateUserResponse is the response returned by CreateUser rpc.
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
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 DeleteUserRequest ¶
type DeleteUserRequest struct {
// username defines the username we want to delete.
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
DeleteUserRequest is the parameter message for DeleteUser rpc.
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetUsername ¶
func (x *DeleteUserRequest) GetUsername() string
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type DeleteUserResponse ¶
type DeleteUserResponse struct {
// contains filtered or unexported fields
}
DeleteUserResponse is the response returned by DeleteUser rpc.
func (*DeleteUserResponse) Descriptor
deprecated
func (*DeleteUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserResponse) ProtoMessage ¶
func (*DeleteUserResponse) ProtoMessage()
func (*DeleteUserResponse) ProtoReflect ¶
func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserResponse) Reset ¶
func (x *DeleteUserResponse) Reset()
func (*DeleteUserResponse) String ¶
func (x *DeleteUserResponse) String() string
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct {
}
UnimplementedUsersServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersServer) ChangeUserPassword ¶
func (*UnimplementedUsersServer) ChangeUserPassword(context.Context, *ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
func (*UnimplementedUsersServer) CreateUser ¶
func (*UnimplementedUsersServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (*UnimplementedUsersServer) DeleteUser ¶
func (*UnimplementedUsersServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
type UsersClient ¶
type UsersClient interface {
// CreateUser creates a new user given a username and password.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - ALREADY_EXISTS(6): When a users already exists.
// - INTERNAL(13): When an internal problem happens.
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
// ChangeUserPassword updates the password of an existing user.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - NOT_FOUND(5): When user does not exist.
// - INTERNAL(13): When an internal problem happens.
ChangeUserPassword(ctx context.Context, in *ChangeUserPasswordRequest, opts ...grpc.CallOption) (*ChangeUserPasswordResponse, error)
// DeleteUser removes a previously registered user.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - NOT_FOUND(5): When user does not exist.
// - INTERNAL(13): When an internal problem happens.
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
}
UsersClient is the client API for Users service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersClient ¶
func NewUsersClient(cc *grpc.ClientConn) UsersClient
type UsersServer ¶
type UsersServer interface {
// CreateUser creates a new user given a username and password.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - ALREADY_EXISTS(6): When a users already exists.
// - INTERNAL(13): When an internal problem happens.
CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
// ChangeUserPassword updates the password of an existing user.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - NOT_FOUND(5): When user does not exist.
// - INTERNAL(13): When an internal problem happens.
ChangeUserPassword(context.Context, *ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
// DeleteUser removes a previously registered user.
//
// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
// - NOT_FOUND(5): When user does not exist.
// - INTERNAL(13): When an internal problem happens.
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
}
UsersServer is the server API for Users service.