Documentation ¶
Index ¶
- Constants
- Variables
- func AuthenticationCtx() func(http.Handler) http.Handler
- func ParseHeader(r *http.Request) (*types.Signature, types.Address, []byte, error)
- func SetHeaders(w http.ResponseWriter, status int)
- type AuthModel
- type AuthorizeParams
- type Config
- type Db
- type DepositParams
- type Escrow
- type RedeemModel
- type RedeemParams
- type RefundModel
- type RegisterParams
- type Server
- type Service
- type VerifyParams
- type Wallet
- type WithdrawParams
Constants ¶
View Source
const (
CtxKeyAddress ctxKey = iota
)
Variables ¶
Functions ¶
func ParseHeader ¶
func SetHeaders ¶
func SetHeaders(w http.ResponseWriter, status int)
Types ¶
type AuthorizeParams ¶
type AuthorizeParams struct {
Proxy string `validate:"required,is-filecoin-address" json:"proxy"`
}
type Config ¶
type Config struct { Env string `toml:"env"` Logger http.Logger `toml:"logger"` Db Db `toml:"database"` HTTP http.HTTP `toml:"http"` Wallet Wallet `toml:"wallet"` Escrow Escrow `toml:"escrow"` }
func LoadConfiguration ¶
type DepositParams ¶
type RedeemParams ¶
type RefundModel ¶
type RegisterParams ¶
type Server ¶
func (*Server) RegisterValidators ¶
func (s *Server) RegisterValidators()
type Service ¶
type Service interface { RegisterProxy(spid string, source string, price types.FIL) error Deposit(address string, price types.FIL) (types.FIL, error) Withdraw(address string, destination string, price types.FIL) (types.FIL, error) Balance(address string) (types.FIL, types.FIL, error) Authorize(address string, proxy string) (AuthModel, error) Refund(address string) (RefundModel, error) Verify(address string, uuid uuid.UUID, amount types.FIL) error Redeem(address string, uuid uuid.UUID, amount types.FIL) (RedeemModel, error) }
type VerifyParams ¶
type WithdrawParams ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.