clients_service

package
v0.0.0-...-548a151 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package clients_service is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ClientsService_CreateClient_FullMethodName = "/clients_service.ClientsService/CreateClient"
	ClientsService_GetClient_FullMethodName    = "/clients_service.ClientsService/GetClient"
	ClientsService_ListClients_FullMethodName  = "/clients_service.ClientsService/ListClients"
	ClientsService_UpdateClient_FullMethodName = "/clients_service.ClientsService/UpdateClient"
)

Variables

View Source
var ClientsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "clients_service.ClientsService",
	HandlerType: (*ClientsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateClient",
			Handler:    _ClientsService_CreateClient_Handler,
		},
		{
			MethodName: "GetClient",
			Handler:    _ClientsService_GetClient_Handler,
		},
		{
			MethodName: "ListClients",
			Handler:    _ClientsService_ListClients_Handler,
		},
		{
			MethodName: "UpdateClient",
			Handler:    _ClientsService_UpdateClient_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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetApiKey

func (x *Client) GetApiKey() string

func (*Client) GetCreatedAt

func (x *Client) GetCreatedAt() *timestamppb.Timestamp

func (*Client) GetDeletedAt

func (x *Client) GetDeletedAt() *timestamppb.Timestamp

func (*Client) GetEmail

func (x *Client) GetEmail() string

func (*Client) GetId

func (x *Client) GetId() string

func (*Client) GetIsInvoiceNotificationEnabled

func (x *Client) GetIsInvoiceNotificationEnabled() bool

func (*Client) GetPhotoUrl

func (x *Client) GetPhotoUrl() string

func (*Client) GetUsername

func (x *Client) GetUsername() string

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect

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

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

type ClientsServiceClient

type ClientsServiceClient interface {
	CreateClient(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*Client, error)
	GetClient(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*Client, error)
	ListClients(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*ListClientsResponse, error)
	UpdateClient(ctx context.Context, in *UpdateClientRequest, opts ...grpc.CallOption) (*Client, 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.

type ClientsServiceServer

type ClientsServiceServer interface {
	CreateClient(context.Context, *CreateClientRequest) (*Client, error)
	GetClient(context.Context, *GetClientRequest) (*Client, error)
	ListClients(context.Context, *ListClientsRequest) (*ListClientsResponse, error)
	UpdateClient(context.Context, *UpdateClientRequest) (*Client, 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 GetClientRequest

type GetClientRequest struct {
	Filter *GetClientRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClientRequest) Descriptor deprecated

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

Deprecated: Use GetClientRequest.ProtoReflect.Descriptor instead.

func (*GetClientRequest) GetFilter

func (x *GetClientRequest) GetFilter() *GetClientRequest_Filter

func (*GetClientRequest) ProtoMessage

func (*GetClientRequest) ProtoMessage()

func (*GetClientRequest) ProtoReflect

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

func (*GetClientRequest) Reset

func (x *GetClientRequest) Reset()

func (*GetClientRequest) String

func (x *GetClientRequest) String() string

type GetClientRequest_Filter

type GetClientRequest_Filter struct {
	ApiKeyIn   []string `protobuf:"bytes,1,rep,name=api_key_in,json=apiKeyIn,proto3" json:"api_key_in,omitempty"`
	UsernameIn []string `protobuf:"bytes,2,rep,name=username_in,json=usernameIn,proto3" json:"username_in,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClientRequest_Filter) Descriptor deprecated

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

Deprecated: Use GetClientRequest_Filter.ProtoReflect.Descriptor instead.

func (*GetClientRequest_Filter) GetApiKeyIn

func (x *GetClientRequest_Filter) GetApiKeyIn() []string

func (*GetClientRequest_Filter) GetUsernameIn

func (x *GetClientRequest_Filter) GetUsernameIn() []string

func (*GetClientRequest_Filter) ProtoMessage

func (*GetClientRequest_Filter) ProtoMessage()

func (*GetClientRequest_Filter) ProtoReflect

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

func (*GetClientRequest_Filter) Reset

func (x *GetClientRequest_Filter) Reset()

func (*GetClientRequest_Filter) String

func (x *GetClientRequest_Filter) 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 (*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"`
	// 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) 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 (*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 UnimplementedClientsServiceServer

type UnimplementedClientsServiceServer struct {
}

UnimplementedClientsServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClientsServiceServer) CreateClient

func (UnimplementedClientsServiceServer) GetClient

func (UnimplementedClientsServiceServer) ListClients

func (UnimplementedClientsServiceServer) UpdateClient

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

Jump to

Keyboard shortcuts

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