Documentation ¶
Index ¶
- Constants
- func NewAccountsServiceHandler(svc AccountsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type AccountsServiceClient
- type AccountsServiceHandler
- type UnimplementedAccountsServiceHandler
- func (UnimplementedAccountsServiceHandler) ApplyBalancesChanges(context.Context, *connect.Request[v1.ApplyBalancesChangesRequest]) (*connect.Response[v1.GetBalanceResponse], error)
- func (UnimplementedAccountsServiceHandler) GetActualBalance(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.GetBalanceResponse], error)
- func (UnimplementedAccountsServiceHandler) GetAllAccounts(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.AccountsResponse], error)
- func (UnimplementedAccountsServiceHandler) GetMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error)
- func (UnimplementedAccountsServiceHandler) PutMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error)
Constants ¶
const ( // AccountsServiceGetAllAccountsProcedure is the fully-qualified name of the AccountsService's // GetAllAccounts RPC. AccountsServiceGetAllAccountsProcedure = "/linq.money.accounts.v1.AccountsService/GetAllAccounts" // AccountsServiceGetActualBalanceProcedure is the fully-qualified name of the AccountsService's // getActualBalance RPC. AccountsServiceGetActualBalanceProcedure = "/linq.money.accounts.v1.AccountsService/getActualBalance" // AccountsServicePutMoneyProcedure is the fully-qualified name of the AccountsService's putMoney // RPC. AccountsServicePutMoneyProcedure = "/linq.money.accounts.v1.AccountsService/putMoney" // AccountsServiceGetMoneyProcedure is the fully-qualified name of the AccountsService's getMoney // RPC. AccountsServiceGetMoneyProcedure = "/linq.money.accounts.v1.AccountsService/getMoney" // AccountsServiceApplyBalancesChangesProcedure is the fully-qualified name of the AccountsService's // applyBalancesChanges RPC. AccountsServiceApplyBalancesChangesProcedure = "/linq.money.accounts.v1.AccountsService/applyBalancesChanges" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// AccountsServiceName is the fully-qualified name of the AccountsService service.
AccountsServiceName = "linq.money.accounts.v1.AccountsService"
)
Variables ¶
This section is empty.
Functions ¶
func NewAccountsServiceHandler ¶
func NewAccountsServiceHandler(svc AccountsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewAccountsServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type AccountsServiceClient ¶
type AccountsServiceClient interface { // Return list of available user accounts with its balances // To get full list, do not provide currency parameter GetAllAccounts(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.AccountsResponse], error) // Returns actual balance for a requested internal currency GetActualBalance(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.GetBalanceResponse], error) // Deposits money to account accorignly to the currency PutMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error) // Withdraws money from account accordingly to the currency GetMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error) // Get and put money for specified access tokens // DO NOT USE! // // Deprecated: do not use. ApplyBalancesChanges(context.Context, *connect.Request[v1.ApplyBalancesChangesRequest]) (*connect.Response[v1.GetBalanceResponse], error) }
AccountsServiceClient is a client for the linq.money.accounts.v1.AccountsService service.
func NewAccountsServiceClient ¶
func NewAccountsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AccountsServiceClient
NewAccountsServiceClient constructs a client for the linq.money.accounts.v1.AccountsService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type AccountsServiceHandler ¶
type AccountsServiceHandler interface { // Return list of available user accounts with its balances // To get full list, do not provide currency parameter GetAllAccounts(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.AccountsResponse], error) // Returns actual balance for a requested internal currency GetActualBalance(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.GetBalanceResponse], error) // Deposits money to account accorignly to the currency PutMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error) // Withdraws money from account accordingly to the currency GetMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error) // Get and put money for specified access tokens // DO NOT USE! // // Deprecated: do not use. ApplyBalancesChanges(context.Context, *connect.Request[v1.ApplyBalancesChangesRequest]) (*connect.Response[v1.GetBalanceResponse], error) }
AccountsServiceHandler is an implementation of the linq.money.accounts.v1.AccountsService service.
type UnimplementedAccountsServiceHandler ¶
type UnimplementedAccountsServiceHandler struct{}
UnimplementedAccountsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedAccountsServiceHandler) ApplyBalancesChanges ¶
func (UnimplementedAccountsServiceHandler) ApplyBalancesChanges(context.Context, *connect.Request[v1.ApplyBalancesChangesRequest]) (*connect.Response[v1.GetBalanceResponse], error)
func (UnimplementedAccountsServiceHandler) GetActualBalance ¶
func (UnimplementedAccountsServiceHandler) GetActualBalance(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.GetBalanceResponse], error)
func (UnimplementedAccountsServiceHandler) GetAllAccounts ¶
func (UnimplementedAccountsServiceHandler) GetAllAccounts(context.Context, *connect.Request[v1.GetBalanceRequest]) (*connect.Response[v1.AccountsResponse], error)
func (UnimplementedAccountsServiceHandler) GetMoney ¶
func (UnimplementedAccountsServiceHandler) GetMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error)
func (UnimplementedAccountsServiceHandler) PutMoney ¶
func (UnimplementedAccountsServiceHandler) PutMoney(context.Context, *connect.Request[v1.MoneyRequest]) (*connect.Response[v1.MoneyResponse], error)