Documentation ¶
Index ¶
- Variables
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type CreateUserRequest
- type DeleteUserRequest
- type GetUserRequest
- type ListUsersRequest
- func (*ListUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest) GetFiltering() *ListUsersRequest_Filtering
- func (x *ListUsersRequest) GetPageSize() int32
- func (x *ListUsersRequest) GetPageToken() string
- func (*ListUsersRequest) ProtoMessage()
- func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest) Reset()
- func (x *ListUsersRequest) String() string
- type ListUsersRequest_Filtering
- func (*ListUsersRequest_Filtering) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest_Filtering) GetCountries() []string
- func (*ListUsersRequest_Filtering) ProtoMessage()
- func (x *ListUsersRequest_Filtering) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest_Filtering) Reset()
- func (x *ListUsersRequest_Filtering) String() string
- type ListUsersResponse
- func (*ListUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersResponse) GetNextPageToken() string
- func (x *ListUsersResponse) GetUsers() []*User
- func (*ListUsersResponse) ProtoMessage()
- func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
- func (x *ListUsersResponse) Reset()
- func (x *ListUsersResponse) String() string
- type UnimplementedUsersServer
- func (UnimplementedUsersServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
- func (UnimplementedUsersServer) DeleteUser(context.Context, *DeleteUserRequest) (*empty.Empty, error)
- func (UnimplementedUsersServer) GetUser(context.Context, *GetUserRequest) (*User, error)
- func (UnimplementedUsersServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
- func (UnimplementedUsersServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
- type UnsafeUsersServer
- type UpdateUserRequest
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCountry() string
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetId() string
- func (x *User) GetLastName() string
- func (x *User) GetNickname() string
- func (x *User) GetUpdatedAt() *timestamp.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserCreated
- type UserDeleted
- type UserUpdated
- type UsersClient
- type UsersServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_users_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetUser ¶
func (x *CreateUserRequest) GetUser() *User
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 DeleteUserRequest ¶
type DeleteUserRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() 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 GetUserRequest ¶
type GetUserRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() string
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 ListUsersRequest ¶
type ListUsersRequest struct { // Represents filtering parameters, if not provided all users will be returned. Filtering *ListUsersRequest_Filtering `protobuf:"bytes,1,opt,name=filtering,proto3" json:"filtering,omitempty"` // The maximum number of items to return. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // The next_page_token value returned from a previous List request, if any. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) GetFiltering ¶
func (x *ListUsersRequest) GetFiltering() *ListUsersRequest_Filtering
func (*ListUsersRequest) GetPageSize ¶
func (x *ListUsersRequest) GetPageSize() int32
func (*ListUsersRequest) GetPageToken ¶
func (x *ListUsersRequest) GetPageToken() string
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type ListUsersRequest_Filtering ¶
type ListUsersRequest_Filtering struct { // List of countries defined by ISO 3166-1 alpha-2. Countries []string `protobuf:"bytes,1,rep,name=countries,proto3" json:"countries,omitempty"` // contains filtered or unexported fields }
func (*ListUsersRequest_Filtering) Descriptor
deprecated
func (*ListUsersRequest_Filtering) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest_Filtering.ProtoReflect.Descriptor instead.
func (*ListUsersRequest_Filtering) GetCountries ¶
func (x *ListUsersRequest_Filtering) GetCountries() []string
func (*ListUsersRequest_Filtering) ProtoMessage ¶
func (*ListUsersRequest_Filtering) ProtoMessage()
func (*ListUsersRequest_Filtering) ProtoReflect ¶
func (x *ListUsersRequest_Filtering) ProtoReflect() protoreflect.Message
func (*ListUsersRequest_Filtering) Reset ¶
func (x *ListUsersRequest_Filtering) Reset()
func (*ListUsersRequest_Filtering) String ¶
func (x *ListUsersRequest_Filtering) String() string
type ListUsersResponse ¶
type ListUsersResponse struct { // List of users. Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // Token to retrieve the next page of results, or empty if there are no // more results in the list. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListUsersResponse) Descriptor
deprecated
func (*ListUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.
func (*ListUsersResponse) GetNextPageToken ¶
func (x *ListUsersResponse) GetNextPageToken() string
func (*ListUsersResponse) GetUsers ¶
func (x *ListUsersResponse) GetUsers() []*User
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) ProtoReflect ¶
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
func (*ListUsersResponse) Reset ¶
func (x *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (x *ListUsersResponse) String() string
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) CreateUser ¶
func (UnimplementedUsersServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
func (UnimplementedUsersServer) DeleteUser ¶
func (UnimplementedUsersServer) DeleteUser(context.Context, *DeleteUserRequest) (*empty.Empty, error)
func (UnimplementedUsersServer) GetUser ¶
func (UnimplementedUsersServer) GetUser(context.Context, *GetUserRequest) (*User, error)
func (UnimplementedUsersServer) ListUsers ¶
func (UnimplementedUsersServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
func (UnimplementedUsersServer) UpdateUser ¶
func (UnimplementedUsersServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
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 User ¶
type User struct { // ID of user. // Output only for create. Required for update. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Fist name of user. FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` // Last name of user. LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` // Nicksname of user. Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"` // User's email. Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` // Country is code defined by ISO 3166-1 alpha-2. Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"` // Timestamp of last updated_at. // Output only. UpdatedAt *timestamp.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCountry ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) GetNickname ¶
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserCreated ¶
type UserCreated struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
UserCreated message is published when user is created.
func (*UserCreated) Descriptor
deprecated
func (*UserCreated) Descriptor() ([]byte, []int)
Deprecated: Use UserCreated.ProtoReflect.Descriptor instead.
func (*UserCreated) GetUser ¶
func (x *UserCreated) GetUser() *User
func (*UserCreated) ProtoMessage ¶
func (*UserCreated) ProtoMessage()
func (*UserCreated) ProtoReflect ¶
func (x *UserCreated) ProtoReflect() protoreflect.Message
func (*UserCreated) Reset ¶
func (x *UserCreated) Reset()
func (*UserCreated) String ¶
func (x *UserCreated) String() string
type UserDeleted ¶
type UserDeleted struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
UserDeleted message is published when user is deleted.
func (*UserDeleted) Descriptor
deprecated
func (*UserDeleted) Descriptor() ([]byte, []int)
Deprecated: Use UserDeleted.ProtoReflect.Descriptor instead.
func (*UserDeleted) GetUser ¶
func (x *UserDeleted) GetUser() *User
func (*UserDeleted) ProtoMessage ¶
func (*UserDeleted) ProtoMessage()
func (*UserDeleted) ProtoReflect ¶
func (x *UserDeleted) ProtoReflect() protoreflect.Message
func (*UserDeleted) Reset ¶
func (x *UserDeleted) Reset()
func (*UserDeleted) String ¶
func (x *UserDeleted) String() string
type UserUpdated ¶
type UserUpdated struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
UserUpdated message is published when user is updated.
func (*UserUpdated) Descriptor
deprecated
func (*UserUpdated) Descriptor() ([]byte, []int)
Deprecated: Use UserUpdated.ProtoReflect.Descriptor instead.
func (*UserUpdated) GetUser ¶
func (x *UserUpdated) GetUser() *User
func (*UserUpdated) ProtoMessage ¶
func (*UserUpdated) ProtoMessage()
func (*UserUpdated) ProtoReflect ¶
func (x *UserUpdated) ProtoReflect() protoreflect.Message
func (*UserUpdated) Reset ¶
func (x *UserUpdated) Reset()
func (*UserUpdated) String ¶
func (x *UserUpdated) String() string
type UsersClient ¶
type UsersClient interface { // Create new user. CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) // Update existing user. UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) // Get user returns user by id. GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) // Deletes an user. DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*empty.Empty, error) // List users. ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) }
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { // Create new user. CreateUser(context.Context, *CreateUserRequest) (*User, error) // Update existing user. UpdateUser(context.Context, *UpdateUserRequest) (*User, error) // Get user returns user by id. GetUser(context.Context, *GetUserRequest) (*User, error) // Deletes an user. DeleteUser(context.Context, *DeleteUserRequest) (*empty.Empty, error) // List users. ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility