structs

package
v0.0.0-...-25c9f67 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bid

type Bid struct {
	Id             common.Hash
	Provider       common.Address
	ModelAgentId   common.Hash
	PricePerSecond *big.Int
	Nonce          *big.Int
	CreatedAt      *big.Int
	DeletedAt      *big.Int
}

type Model

type Model struct {
	Id        common.Hash
	IpfsCID   common.Hash
	Fee       *big.Int
	Stake     *big.Int
	Owner     common.Address
	Name      string
	Tags      []string
	CreatedAt *big.Int
	IsDeleted bool
}

type OpenSessionRequest

type OpenSessionRequest struct {
	Approval    lib.HexString `json:"approval" binding:"required" validate:"hexadecimal"`
	ApprovalSig lib.HexString `json:"approvalSig" binding:"required" validate:"hexadecimal"`
	Stake       *lib.BigInt   `json:"stake" binding:"required" validate:"number,gt=0"`
}

type OpenSessionWithDurationRequest

type OpenSessionWithDurationRequest struct {
	SessionDuration *lib.BigInt `json:"sessionDuration"`
}

type PathEthAddrID

type PathEthAddrID struct {
	ID lib.Address `uri:"id" binding:"required" validate:"eth_addr"`
}

type PathHex32ID

type PathHex32ID struct {
	ID lib.Hash `uri:"id" binding:"required" validate:"hex32"`
}

type Provider

type Provider struct {
	Address   common.Address
	Endpoint  string
	Stake     *big.Int
	CreatedAt *big.Int
	IsDeleted bool
}

type QueryApprove

type QueryApprove struct {
	*QuerySpender
	Amount *lib.BigInt `form:"amount" binding:"required" validate:"number,gt=0"`
}

type QueryOffsetLimit

type QueryOffsetLimit struct {
	Offset lib.BigInt `form:"offset,default=0" binding:"omitempty" validate:"number"`
	Limit  uint8      `form:"limit,default=10" binding:"omitempty" validate:"number"`
}

type QueryPageLimit

type QueryPageLimit struct {
	Page  uint64 `form:"page,default=0"   binding:"omitempty" validate:"number"`
	Limit uint8  `form:"limit,default=10" binding:"omitempty" validate:"number"`
}

type QuerySpender

type QuerySpender struct {
	Spender common.Address `form:"spender" binding:"required" validate:"eth_addr"`
}

type QueryUserOrProvider

type QueryUserOrProvider struct {
	User     lib.Address `form:"user" binding:"omitempty" validate:"eth_addr"`
	Provider lib.Address `form:"provider" binding:"omitempty" validate:"eth_addr"`
}

type RawEthTransactionResponse

type RawEthTransactionResponse struct {
	Status  string           `json:"status"`
	Message string           `json:"message"`
	Result  []RawTransaction `json:"result"`
}

type RawTransaction

type RawTransaction struct {
	BlockHash         string `json:"blockHash"`
	BlockNumber       string `json:"blockNumber"`
	Confirmations     string `json:"confirmations"`
	ContractAddress   string `json:"contractAddress"`
	CumulativeGasUsed string `json:"cumulativeGasUsed"`

	From             string `json:"from"`
	FunctionName     string `json:"functionName"`
	Gas              string `json:"gas"`
	GasPrice         string `json:"gasPrice"`
	GasPriceBid      string `json:"gasPriceBid"`
	GasUsed          string `json:"gasUsed"`
	Hash             string `json:"hash"`
	Input            string `json:"input"`
	IsError          string `json:"isError"`
	MethodId         string `json:"methodId"`
	Nonce            string `json:"nonce"`
	TimeStamp        string `json:"timeStamp"`
	To               string `json:"to"`
	TransactionIndex string `json:"transactionIndex"`
	TxReceiptStatus  string `json:"txreceipt_status"`
	Value            string `json:"value"`
}

type SendRequest

type SendRequest struct {
	To     common.Address `json:"to" binding:"required" validate:"eth_addr"`
	Amount *lib.BigInt    `json:"amount" binding:"required" validate:"number,gt=0"`
}

type Session

type Session struct {
	Id                      string
	User                    common.Address
	Provider                common.Address
	ModelAgentId            string
	BidID                   string
	Stake                   *big.Int
	PricePerSecond          *big.Int
	CloseoutReceipt         string
	CloseoutType            *big.Int
	ProviderWithdrawnAmount *big.Int
	OpenedAt                *big.Int
	EndsAt                  *big.Int
	ClosedAt                *big.Int
}

Jump to

Keyboard shortcuts

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