Documentation ¶
Overview ¶
Package clients_service is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterClientsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterClientsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClientsServiceClient) error
- func RegisterClientsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterClientsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClientsServiceServer) error
- func RegisterClientsServiceServer(s grpc.ServiceRegistrar, srv ClientsServiceServer)
- type Client
- func (*Client) Descriptor() ([]byte, []int)deprecated
- func (x *Client) GetApiKey() string
- func (x *Client) GetCreatedAt() *timestamppb.Timestamp
- func (x *Client) GetDeletedAt() *timestamppb.Timestamp
- func (x *Client) GetEmail() string
- func (x *Client) GetId() string
- func (x *Client) GetIsInvoiceNotificationEnabled() bool
- func (x *Client) GetPhotoUrl() string
- func (x *Client) GetUsername() string
- func (*Client) ProtoMessage()
- func (x *Client) ProtoReflect() protoreflect.Message
- func (x *Client) Reset()
- func (x *Client) String() string
- type ClientsServiceClient
- type ClientsServiceServer
- type CreateClientRequest
- func (*CreateClientRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateClientRequest) GetEmail() string
- func (x *CreateClientRequest) GetUsername() string
- func (*CreateClientRequest) ProtoMessage()
- func (x *CreateClientRequest) ProtoReflect() protoreflect.Message
- func (x *CreateClientRequest) Reset()
- func (x *CreateClientRequest) String() string
- type DeactivateRequest
- type DeactivateResponse
- type ListClientsRequest
- func (*ListClientsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListClientsRequest) GetFilter() *ListClientsRequest_Filter
- func (x *ListClientsRequest) GetPage() uint64
- func (x *ListClientsRequest) GetPerPage() uint64
- func (*ListClientsRequest) ProtoMessage()
- func (x *ListClientsRequest) ProtoReflect() protoreflect.Message
- func (x *ListClientsRequest) Reset()
- func (x *ListClientsRequest) String() string
- type ListClientsRequest_Filter
- func (*ListClientsRequest_Filter) Descriptor() ([]byte, []int)deprecated
- func (x *ListClientsRequest_Filter) GetApiKeyIn() []string
- func (x *ListClientsRequest_Filter) GetEmailIn() []string
- func (x *ListClientsRequest_Filter) GetIdIn() []string
- func (x *ListClientsRequest_Filter) GetUsernameIn() []string
- func (*ListClientsRequest_Filter) ProtoMessage()
- func (x *ListClientsRequest_Filter) ProtoReflect() protoreflect.Message
- func (x *ListClientsRequest_Filter) Reset()
- func (x *ListClientsRequest_Filter) String() string
- type ListClientsResponse
- func (*ListClientsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListClientsResponse) GetClients() []*Client
- func (*ListClientsResponse) ProtoMessage()
- func (x *ListClientsResponse) ProtoReflect() protoreflect.Message
- func (x *ListClientsResponse) Reset()
- func (x *ListClientsResponse) String() string
- type RegenerateAPIKeyRequest
- func (*RegenerateAPIKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegenerateAPIKeyRequest) GetClientId() string
- func (*RegenerateAPIKeyRequest) ProtoMessage()
- func (x *RegenerateAPIKeyRequest) ProtoReflect() protoreflect.Message
- func (x *RegenerateAPIKeyRequest) Reset()
- func (x *RegenerateAPIKeyRequest) String() string
- type UnimplementedClientsServiceServer
- func (UnimplementedClientsServiceServer) CreateClient(context.Context, *CreateClientRequest) (*Client, error)
- func (UnimplementedClientsServiceServer) Deactivate(context.Context, *DeactivateRequest) (*DeactivateResponse, error)
- func (UnimplementedClientsServiceServer) ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error)
- func (UnimplementedClientsServiceServer) RegenerateAPIKey(context.Context, *RegenerateAPIKeyRequest) (*Client, error)
- func (UnimplementedClientsServiceServer) UpdateClient(context.Context, *UpdateClientRequest) (*Client, error)
- type UnsafeClientsServiceServer
- type UpdateClientRequest
- func (*UpdateClientRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateClientRequest) GetId() string
- func (x *UpdateClientRequest) GetIsInvoiceNotificationEnabled() bool
- func (*UpdateClientRequest) ProtoMessage()
- func (x *UpdateClientRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateClientRequest) Reset()
- func (x *UpdateClientRequest) String() string
Constants ¶
const ( ClientsService_CreateClient_FullMethodName = "/clients_service.ClientsService/CreateClient" ClientsService_ListClients_FullMethodName = "/clients_service.ClientsService/ListClients" ClientsService_UpdateClient_FullMethodName = "/clients_service.ClientsService/UpdateClient" ClientsService_RegenerateAPIKey_FullMethodName = "/clients_service.ClientsService/RegenerateAPIKey" ClientsService_Deactivate_FullMethodName = "/clients_service.ClientsService/Deactivate" )
Variables ¶
var ClientsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "clients_service.ClientsService", HandlerType: (*ClientsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateClient", Handler: _ClientsService_CreateClient_Handler, }, { MethodName: "ListClients", Handler: _ClientsService_ListClients_Handler, }, { MethodName: "UpdateClient", Handler: _ClientsService_UpdateClient_Handler, }, { MethodName: "RegenerateAPIKey", Handler: _ClientsService_RegenerateAPIKey_Handler, }, { MethodName: "Deactivate", Handler: _ClientsService_Deactivate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/clients-service/clients-service.proto", }
ClientsService_ServiceDesc is the grpc.ServiceDesc for ClientsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_clients_service_clients_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClientsServiceHandler ¶
func RegisterClientsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterClientsServiceHandler registers the http handlers for service ClientsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterClientsServiceHandlerClient ¶
func RegisterClientsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClientsServiceClient) error
RegisterClientsServiceHandlerClient registers the http handlers for service ClientsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClientsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClientsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClientsServiceClient" to call the correct interceptors.
func RegisterClientsServiceHandlerFromEndpoint ¶
func RegisterClientsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterClientsServiceHandlerFromEndpoint is same as RegisterClientsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterClientsServiceHandlerServer ¶
func RegisterClientsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClientsServiceServer) error
RegisterClientsServiceHandlerServer registers the http handlers for service ClientsService to "mux". UnaryRPC :call ClientsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClientsServiceHandlerFromEndpoint instead.
func RegisterClientsServiceServer ¶
func RegisterClientsServiceServer(s grpc.ServiceRegistrar, srv ClientsServiceServer)
Types ¶
type Client ¶
type Client struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` ApiKey string `protobuf:"bytes,3,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` PhotoUrl *string `protobuf:"bytes,5,opt,name=photo_url,json=photoUrl,proto3,oneof" json:"photo_url,omitempty"` Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` IsInvoiceNotificationEnabled bool `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Client) Descriptor
deprecated
func (*Client) GetCreatedAt ¶
func (x *Client) GetCreatedAt() *timestamppb.Timestamp
func (*Client) GetDeletedAt ¶
func (x *Client) GetDeletedAt() *timestamppb.Timestamp
func (*Client) GetIsInvoiceNotificationEnabled ¶
func (*Client) GetPhotoUrl ¶
func (*Client) GetUsername ¶
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
type ClientsServiceClient ¶
type ClientsServiceClient interface { // Create client CreateClient(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*Client, error) // List client by filters ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error) // Update client data UpdateClient(ctx context.Context, in *UpdateClientRequest, opts ...grpc.CallOption) (*Client, error) // Regenerate client API Key RegenerateAPIKey(ctx context.Context, in *RegenerateAPIKeyRequest, opts ...grpc.CallOption) (*Client, error) // Deactivate client Deactivate(ctx context.Context, in *DeactivateRequest, opts ...grpc.CallOption) (*DeactivateResponse, error) }
ClientsServiceClient is the client API for ClientsService 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 NewClientsServiceClient ¶
func NewClientsServiceClient(cc grpc.ClientConnInterface) ClientsServiceClient
type ClientsServiceServer ¶
type ClientsServiceServer interface { // Create client CreateClient(context.Context, *CreateClientRequest) (*Client, error) // List client by filters ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error) // Update client data UpdateClient(context.Context, *UpdateClientRequest) (*Client, error) // Regenerate client API Key RegenerateAPIKey(context.Context, *RegenerateAPIKeyRequest) (*Client, error) // Deactivate client Deactivate(context.Context, *DeactivateRequest) (*DeactivateResponse, error) // contains filtered or unexported methods }
ClientsServiceServer is the server API for ClientsService service. All implementations must embed UnimplementedClientsServiceServer for forward compatibility
type CreateClientRequest ¶
type CreateClientRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CreateClientRequest) Descriptor
deprecated
func (*CreateClientRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateClientRequest.ProtoReflect.Descriptor instead.
func (*CreateClientRequest) GetEmail ¶
func (x *CreateClientRequest) GetEmail() string
func (*CreateClientRequest) GetUsername ¶
func (x *CreateClientRequest) GetUsername() string
func (*CreateClientRequest) ProtoMessage ¶
func (*CreateClientRequest) ProtoMessage()
func (*CreateClientRequest) ProtoReflect ¶
func (x *CreateClientRequest) ProtoReflect() protoreflect.Message
func (*CreateClientRequest) Reset ¶
func (x *CreateClientRequest) Reset()
func (*CreateClientRequest) String ¶
func (x *CreateClientRequest) String() string
type DeactivateRequest ¶
type DeactivateRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // contains filtered or unexported fields }
func (*DeactivateRequest) Descriptor
deprecated
func (*DeactivateRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeactivateRequest.ProtoReflect.Descriptor instead.
func (*DeactivateRequest) GetClientId ¶
func (x *DeactivateRequest) GetClientId() string
func (*DeactivateRequest) ProtoMessage ¶
func (*DeactivateRequest) ProtoMessage()
func (*DeactivateRequest) ProtoReflect ¶
func (x *DeactivateRequest) ProtoReflect() protoreflect.Message
func (*DeactivateRequest) Reset ¶
func (x *DeactivateRequest) Reset()
func (*DeactivateRequest) String ¶
func (x *DeactivateRequest) String() string
type DeactivateResponse ¶
type DeactivateResponse struct {
// contains filtered or unexported fields
}
func (*DeactivateResponse) Descriptor
deprecated
func (*DeactivateResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeactivateResponse.ProtoReflect.Descriptor instead.
func (*DeactivateResponse) ProtoMessage ¶
func (*DeactivateResponse) ProtoMessage()
func (*DeactivateResponse) ProtoReflect ¶
func (x *DeactivateResponse) ProtoReflect() protoreflect.Message
func (*DeactivateResponse) Reset ¶
func (x *DeactivateResponse) Reset()
func (*DeactivateResponse) String ¶
func (x *DeactivateResponse) String() string
type ListClientsRequest ¶
type ListClientsRequest struct { Filter *ListClientsRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` Page uint64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` PerPage uint64 `protobuf:"varint,3,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"` // contains filtered or unexported fields }
func (*ListClientsRequest) Descriptor
deprecated
func (*ListClientsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListClientsRequest.ProtoReflect.Descriptor instead.
func (*ListClientsRequest) GetFilter ¶
func (x *ListClientsRequest) GetFilter() *ListClientsRequest_Filter
func (*ListClientsRequest) GetPage ¶
func (x *ListClientsRequest) GetPage() uint64
func (*ListClientsRequest) GetPerPage ¶
func (x *ListClientsRequest) GetPerPage() uint64
func (*ListClientsRequest) ProtoMessage ¶
func (*ListClientsRequest) ProtoMessage()
func (*ListClientsRequest) ProtoReflect ¶
func (x *ListClientsRequest) ProtoReflect() protoreflect.Message
func (*ListClientsRequest) Reset ¶
func (x *ListClientsRequest) Reset()
func (*ListClientsRequest) String ¶
func (x *ListClientsRequest) String() string
type ListClientsRequest_Filter ¶
type ListClientsRequest_Filter struct { IdIn []string `protobuf:"bytes,1,rep,name=id_in,json=idIn,proto3" json:"id_in,omitempty"` UsernameIn []string `protobuf:"bytes,2,rep,name=username_in,json=usernameIn,proto3" json:"username_in,omitempty"` EmailIn []string `protobuf:"bytes,3,rep,name=email_in,json=emailIn,proto3" json:"email_in,omitempty"` ApiKeyIn []string `protobuf:"bytes,4,rep,name=api_key_in,json=apiKeyIn,proto3" json:"api_key_in,omitempty"` // contains filtered or unexported fields }
func (*ListClientsRequest_Filter) Descriptor
deprecated
func (*ListClientsRequest_Filter) Descriptor() ([]byte, []int)
Deprecated: Use ListClientsRequest_Filter.ProtoReflect.Descriptor instead.
func (*ListClientsRequest_Filter) GetApiKeyIn ¶
func (x *ListClientsRequest_Filter) GetApiKeyIn() []string
func (*ListClientsRequest_Filter) GetEmailIn ¶
func (x *ListClientsRequest_Filter) GetEmailIn() []string
func (*ListClientsRequest_Filter) GetIdIn ¶
func (x *ListClientsRequest_Filter) GetIdIn() []string
func (*ListClientsRequest_Filter) GetUsernameIn ¶
func (x *ListClientsRequest_Filter) GetUsernameIn() []string
func (*ListClientsRequest_Filter) ProtoMessage ¶
func (*ListClientsRequest_Filter) ProtoMessage()
func (*ListClientsRequest_Filter) ProtoReflect ¶
func (x *ListClientsRequest_Filter) ProtoReflect() protoreflect.Message
func (*ListClientsRequest_Filter) Reset ¶
func (x *ListClientsRequest_Filter) Reset()
func (*ListClientsRequest_Filter) String ¶
func (x *ListClientsRequest_Filter) String() string
type ListClientsResponse ¶
type ListClientsResponse struct { Clients []*Client `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` // contains filtered or unexported fields }
func (*ListClientsResponse) Descriptor
deprecated
func (*ListClientsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListClientsResponse.ProtoReflect.Descriptor instead.
func (*ListClientsResponse) GetClients ¶
func (x *ListClientsResponse) GetClients() []*Client
func (*ListClientsResponse) ProtoMessage ¶
func (*ListClientsResponse) ProtoMessage()
func (*ListClientsResponse) ProtoReflect ¶
func (x *ListClientsResponse) ProtoReflect() protoreflect.Message
func (*ListClientsResponse) Reset ¶
func (x *ListClientsResponse) Reset()
func (*ListClientsResponse) String ¶
func (x *ListClientsResponse) String() string
type RegenerateAPIKeyRequest ¶
type RegenerateAPIKeyRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // contains filtered or unexported fields }
func (*RegenerateAPIKeyRequest) Descriptor
deprecated
func (*RegenerateAPIKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegenerateAPIKeyRequest.ProtoReflect.Descriptor instead.
func (*RegenerateAPIKeyRequest) GetClientId ¶
func (x *RegenerateAPIKeyRequest) GetClientId() string
func (*RegenerateAPIKeyRequest) ProtoMessage ¶
func (*RegenerateAPIKeyRequest) ProtoMessage()
func (*RegenerateAPIKeyRequest) ProtoReflect ¶
func (x *RegenerateAPIKeyRequest) ProtoReflect() protoreflect.Message
func (*RegenerateAPIKeyRequest) Reset ¶
func (x *RegenerateAPIKeyRequest) Reset()
func (*RegenerateAPIKeyRequest) String ¶
func (x *RegenerateAPIKeyRequest) String() string
type UnimplementedClientsServiceServer ¶
type UnimplementedClientsServiceServer struct { }
UnimplementedClientsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedClientsServiceServer) CreateClient ¶
func (UnimplementedClientsServiceServer) CreateClient(context.Context, *CreateClientRequest) (*Client, error)
func (UnimplementedClientsServiceServer) Deactivate ¶
func (UnimplementedClientsServiceServer) Deactivate(context.Context, *DeactivateRequest) (*DeactivateResponse, error)
func (UnimplementedClientsServiceServer) ListClients ¶
func (UnimplementedClientsServiceServer) ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error)
func (UnimplementedClientsServiceServer) RegenerateAPIKey ¶
func (UnimplementedClientsServiceServer) RegenerateAPIKey(context.Context, *RegenerateAPIKeyRequest) (*Client, error)
func (UnimplementedClientsServiceServer) UpdateClient ¶
func (UnimplementedClientsServiceServer) UpdateClient(context.Context, *UpdateClientRequest) (*Client, error)
type UnsafeClientsServiceServer ¶
type UnsafeClientsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeClientsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClientsServiceServer will result in compilation errors.
type UpdateClientRequest ¶
type UpdateClientRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` IsInvoiceNotificationEnabled *bool `` /* 156-byte string literal not displayed */ // contains filtered or unexported fields }
func (*UpdateClientRequest) Descriptor
deprecated
func (*UpdateClientRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateClientRequest.ProtoReflect.Descriptor instead.
func (*UpdateClientRequest) GetId ¶
func (x *UpdateClientRequest) GetId() string
func (*UpdateClientRequest) GetIsInvoiceNotificationEnabled ¶
func (x *UpdateClientRequest) GetIsInvoiceNotificationEnabled() bool
func (*UpdateClientRequest) ProtoMessage ¶
func (*UpdateClientRequest) ProtoMessage()
func (*UpdateClientRequest) ProtoReflect ¶
func (x *UpdateClientRequest) ProtoReflect() protoreflect.Message
func (*UpdateClientRequest) Reset ¶
func (x *UpdateClientRequest) Reset()
func (*UpdateClientRequest) String ¶
func (x *UpdateClientRequest) String() string