package
0.0.0-20221218120333-a376c7093645
Repository: https://github.com/satornetwork/sator-api.git
Documentation: pkg.go.dev

# README

Example service

Boilerplate for architecture of a service based on go-kit (repo).

Service - is where all of the business logic is implemented. A service usually glues together multiple endpoints. In Go kit, services are typically modeled as interfaces, and implementations of those interfaces contain the business logic. Go kit services should strive to abide the Clean Architecture or the Hexagonal Architecture. That is, the business logic should have no knowledge of endpoint- or especially transport-domain concepts: your service shouldn’t know anything about HTTP headers, or gRPC error codes.

Endpoints is like an action/handler on a controller; it’s where safety and antifragile logic lives. If you implement two transports (HTTP and gRPC), you might have two methods of sending requests to the same endpoint.

Transport is bound to concrete transports like HTTP or gRPC. In a world where microservices may support one or more transports, this is very powerful; you can support a legacy HTTP API and a newer RPC service, all in a single microservice.

To get more details go to the official documentation - go-kit - architecture and design.

# Packages

No description provided by the author
No description provided by the author

# Functions

MakeClaimRewardsEndpoint ...
No description provided by the author
MakeGetRewardsWalletEndpoint ...
MakeGetTransactionsEndpoint ...
MakeHTTPHandler ...
NewService is a factory function, returns a new instance of the Service interface implementation.
WithAssetName option Default value: SAO.
WithExplorerURLTmpl option Default value: "https://explorer.solana.com/tx/%s?cluster=devnet".
WithHoldRewardsPeriod option Default value: 30 days.
WithMinAmountToClaim ...

# Constants

TransactionTypeDeposit indicates that transaction type deposit.
TransactionTypeWithdraw indicates that transaction type withdraw.

# Variables

ErrInvalidParameter indicates that passed invalid parameter.
No description provided by the author
ErrRewardsAlreadyClaimed indicated that all rewards already claimed.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author