Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Allowance
- type Balance
- type Bid
- type BidList
- type BlockchainAllowanceGetParams
- type BlockchainAllowanceService
- type BlockchainBalanceService
- type BlockchainBidNewParams
- type BlockchainBidService
- func (r *BlockchainBidService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *BlockchainBidService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Bid, err error)
- func (r *BlockchainBidService) New(ctx context.Context, body BlockchainBidNewParams, opts ...option.RequestOption) (res *Bid, err error)
- func (r *BlockchainBidService) Session(ctx context.Context, id string, body BlockchainBidSessionParams, ...) (res *shared.Session, err error)
- type BlockchainBidSessionParams
- type BlockchainLatestBlockService
- type BlockchainModelBidActiveService
- type BlockchainModelBidListParams
- type BlockchainModelBidRatedService
- type BlockchainModelBidService
- type BlockchainModelNewParams
- type BlockchainModelService
- func (r *BlockchainModelService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *BlockchainModelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)
- func (r *BlockchainModelService) New(ctx context.Context, body BlockchainModelNewParams, ...) (res *Model, err error)
- type BlockchainModelSessionNewParams
- type BlockchainModelSessionService
- type BlockchainModelStatService
- type BlockchainProviderBidActiveService
- type BlockchainProviderBidListParams
- type BlockchainProviderBidService
- type BlockchainProviderNewParams
- type BlockchainProviderService
- func (r *BlockchainProviderService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *BlockchainProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Provider, err error)
- func (r *BlockchainProviderService) New(ctx context.Context, body BlockchainProviderNewParams, ...) (res *Provider, err error)
- type BlockchainSendEthParams
- type BlockchainSendMorParams
- type BlockchainService
- type BlockchainSessionNewParams
- type BlockchainSessionProviderParams
- type BlockchainSessionService
- func (r *BlockchainSessionService) Budget(ctx context.Context, opts ...option.RequestOption) (res *Budget, err error)
- func (r *BlockchainSessionService) Close(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *BlockchainSessionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *shared.Session, err error)
- func (r *BlockchainSessionService) New(ctx context.Context, body BlockchainSessionNewParams, ...) (res *shared.Session, err error)
- func (r *BlockchainSessionService) Provider(ctx context.Context, query BlockchainSessionProviderParams, ...) (res *SessionList, err error)
- func (r *BlockchainSessionService) User(ctx context.Context, query BlockchainSessionUserParams, ...) (res *SessionList, err error)
- type BlockchainSessionUserParams
- type BlockchainTokenService
- type BlockchainTokenSupplyService
- type BlockchainTransactionService
- type Budget
- type ClaimableBalance
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Error
- type LatestBlock
- type Model
- type ModelStats
- type Provider
- type ProxyService
- type ProxySessionInitiateParams
- type ProxySessionProviderClaimParams
- type ProxySessionService
- func (r *ProxySessionService) Initiate(ctx context.Context, body ProxySessionInitiateParams, ...) (res *shared.Session, err error)
- func (r *ProxySessionService) ProviderClaim(ctx context.Context, id string, body ProxySessionProviderClaimParams, ...) (res *ClaimableBalance, err error)
- func (r *ProxySessionService) ProviderClaimableBalance(ctx context.Context, id string, opts ...option.RequestOption) (res *ClaimableBalance, err error)
- type Session
- type SessionList
- type TokenSupply
- type TransactionList
- type TransactionListTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Allowance ¶
type Allowance struct { // Current allowance amount Allowance string `json:"allowance,required"` JSON allowanceJSON `json:"-"` }
func (*Allowance) UnmarshalJSON ¶
type Bid ¶
type Bid struct { // Unique identifier of the bid ID string `json:"id,required"` // ID of the model the bid is for ModelID string `json:"modelID,required"` // Bid price per second PricePerSecond string `json:"pricePerSecond,required"` JSON bidJSON `json:"-"` }
func (*Bid) UnmarshalJSON ¶
type BlockchainAllowanceGetParams ¶
type BlockchainAllowanceGetParams struct { // Spender Ethereum address Spender param.Field[string] `query:"spender,required"` }
func (BlockchainAllowanceGetParams) URLQuery ¶
func (r BlockchainAllowanceGetParams) URLQuery() (v url.Values)
URLQuery serializes BlockchainAllowanceGetParams's query parameters as `url.Values`.
type BlockchainAllowanceService ¶
type BlockchainAllowanceService struct {
Options []option.RequestOption
}
BlockchainAllowanceService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainAllowanceService method instead.
func NewBlockchainAllowanceService ¶
func NewBlockchainAllowanceService(opts ...option.RequestOption) (r *BlockchainAllowanceService)
NewBlockchainAllowanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainAllowanceService) Get ¶
func (r *BlockchainAllowanceService) Get(ctx context.Context, query BlockchainAllowanceGetParams, opts ...option.RequestOption) (res *Allowance, err error)
Retrieve allowance
type BlockchainBalanceService ¶
type BlockchainBalanceService struct {
Options []option.RequestOption
}
BlockchainBalanceService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainBalanceService method instead.
func NewBlockchainBalanceService ¶
func NewBlockchainBalanceService(opts ...option.RequestOption) (r *BlockchainBalanceService)
NewBlockchainBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainBalanceService) Get ¶
func (r *BlockchainBalanceService) Get(ctx context.Context, opts ...option.RequestOption) (res *shared.Balance, err error)
Retrieve balance
type BlockchainBidNewParams ¶
type BlockchainBidNewParams struct { // ID of the model to bid on ModelID param.Field[string] `json:"modelID,required"` // Bid price per second PricePerSecond param.Field[string] `json:"pricePerSecond,required"` }
func (BlockchainBidNewParams) MarshalJSON ¶
func (r BlockchainBidNewParams) MarshalJSON() (data []byte, err error)
type BlockchainBidService ¶
type BlockchainBidService struct {
Options []option.RequestOption
}
BlockchainBidService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainBidService method instead.
func NewBlockchainBidService ¶
func NewBlockchainBidService(opts ...option.RequestOption) (r *BlockchainBidService)
NewBlockchainBidService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainBidService) Delete ¶
func (r *BlockchainBidService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a bid
func (*BlockchainBidService) Get ¶
func (r *BlockchainBidService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Bid, err error)
Retrieve a bid
func (*BlockchainBidService) New ¶
func (r *BlockchainBidService) New(ctx context.Context, body BlockchainBidNewParams, opts ...option.RequestOption) (res *Bid, err error)
Create a new bid
func (*BlockchainBidService) Session ¶
func (r *BlockchainBidService) Session(ctx context.Context, id string, body BlockchainBidSessionParams, opts ...option.RequestOption) (res *shared.Session, err error)
Start a session for a bid
type BlockchainBidSessionParams ¶
type BlockchainBidSessionParams struct { // Duration of the session SessionDuration param.Field[string] `json:"sessionDuration,required"` }
func (BlockchainBidSessionParams) MarshalJSON ¶
func (r BlockchainBidSessionParams) MarshalJSON() (data []byte, err error)
type BlockchainLatestBlockService ¶
type BlockchainLatestBlockService struct {
Options []option.RequestOption
}
BlockchainLatestBlockService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainLatestBlockService method instead.
func NewBlockchainLatestBlockService ¶
func NewBlockchainLatestBlockService(opts ...option.RequestOption) (r *BlockchainLatestBlockService)
NewBlockchainLatestBlockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainLatestBlockService) Get ¶
func (r *BlockchainLatestBlockService) Get(ctx context.Context, opts ...option.RequestOption) (res *LatestBlock, err error)
Get latest block number
type BlockchainModelBidActiveService ¶
type BlockchainModelBidActiveService struct {
Options []option.RequestOption
}
BlockchainModelBidActiveService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelBidActiveService method instead.
func NewBlockchainModelBidActiveService ¶
func NewBlockchainModelBidActiveService(opts ...option.RequestOption) (r *BlockchainModelBidActiveService)
NewBlockchainModelBidActiveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BlockchainModelBidListParams ¶
type BlockchainModelBidListParams struct { // Maximum number of results to return Limit param.Field[int64] `query:"limit"` // Number of results to skip Offset param.Field[int64] `query:"offset"` }
func (BlockchainModelBidListParams) URLQuery ¶
func (r BlockchainModelBidListParams) URLQuery() (v url.Values)
URLQuery serializes BlockchainModelBidListParams's query parameters as `url.Values`.
type BlockchainModelBidRatedService ¶
type BlockchainModelBidRatedService struct {
Options []option.RequestOption
}
BlockchainModelBidRatedService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelBidRatedService method instead.
func NewBlockchainModelBidRatedService ¶
func NewBlockchainModelBidRatedService(opts ...option.RequestOption) (r *BlockchainModelBidRatedService)
NewBlockchainModelBidRatedService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BlockchainModelBidService ¶
type BlockchainModelBidService struct { Options []option.RequestOption Active *BlockchainModelBidActiveService Rated *BlockchainModelBidRatedService }
BlockchainModelBidService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelBidService method instead.
func NewBlockchainModelBidService ¶
func NewBlockchainModelBidService(opts ...option.RequestOption) (r *BlockchainModelBidService)
NewBlockchainModelBidService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainModelBidService) List ¶
func (r *BlockchainModelBidService) List(ctx context.Context, id string, query BlockchainModelBidListParams, opts ...option.RequestOption) (res *shared.BidList, err error)
List bids for a model
type BlockchainModelNewParams ¶
type BlockchainModelNewParams struct { // Fee for using the model Fee param.Field[string] `json:"fee,required"` // IPFS ID where the model is stored IpfsID param.Field[string] `json:"ipfsID,required"` // Model ID provided by the user ModelID param.Field[string] `json:"modelID,required"` // Name of the model Name param.Field[string] `json:"name,required"` // Amount to stake for the model Stake param.Field[string] `json:"stake,required"` // Tags associated with the model Tags param.Field[[]string] `json:"tags"` }
func (BlockchainModelNewParams) MarshalJSON ¶
func (r BlockchainModelNewParams) MarshalJSON() (data []byte, err error)
type BlockchainModelService ¶
type BlockchainModelService struct { Options []option.RequestOption Sessions *BlockchainModelSessionService Bids *BlockchainModelBidService Stats *BlockchainModelStatService }
BlockchainModelService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelService method instead.
func NewBlockchainModelService ¶
func NewBlockchainModelService(opts ...option.RequestOption) (r *BlockchainModelService)
NewBlockchainModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainModelService) Delete ¶
func (r *BlockchainModelService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a model
func (*BlockchainModelService) List ¶
func (r *BlockchainModelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)
List all available models
func (*BlockchainModelService) New ¶
func (r *BlockchainModelService) New(ctx context.Context, body BlockchainModelNewParams, opts ...option.RequestOption) (res *Model, err error)
Create a new model
type BlockchainModelSessionNewParams ¶
type BlockchainModelSessionNewParams struct { // Duration of the session SessionDuration param.Field[string] `json:"sessionDuration,required"` }
func (BlockchainModelSessionNewParams) MarshalJSON ¶
func (r BlockchainModelSessionNewParams) MarshalJSON() (data []byte, err error)
type BlockchainModelSessionService ¶
type BlockchainModelSessionService struct {
Options []option.RequestOption
}
BlockchainModelSessionService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelSessionService method instead.
func NewBlockchainModelSessionService ¶
func NewBlockchainModelSessionService(opts ...option.RequestOption) (r *BlockchainModelSessionService)
NewBlockchainModelSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainModelSessionService) New ¶
func (r *BlockchainModelSessionService) New(ctx context.Context, id string, body BlockchainModelSessionNewParams, opts ...option.RequestOption) (res *shared.Session, err error)
Start a session for a model
type BlockchainModelStatService ¶
type BlockchainModelStatService struct {
Options []option.RequestOption
}
BlockchainModelStatService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainModelStatService method instead.
func NewBlockchainModelStatService ¶
func NewBlockchainModelStatService(opts ...option.RequestOption) (r *BlockchainModelStatService)
NewBlockchainModelStatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainModelStatService) Get ¶
func (r *BlockchainModelStatService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ModelStats, err error)
Retrieve statistics for a model
type BlockchainProviderBidActiveService ¶
type BlockchainProviderBidActiveService struct {
Options []option.RequestOption
}
BlockchainProviderBidActiveService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainProviderBidActiveService method instead.
func NewBlockchainProviderBidActiveService ¶
func NewBlockchainProviderBidActiveService(opts ...option.RequestOption) (r *BlockchainProviderBidActiveService)
NewBlockchainProviderBidActiveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BlockchainProviderBidListParams ¶
type BlockchainProviderBidListParams struct { // Maximum number of results to return Limit param.Field[int64] `query:"limit"` // Number of results to skip Offset param.Field[int64] `query:"offset"` }
func (BlockchainProviderBidListParams) URLQuery ¶
func (r BlockchainProviderBidListParams) URLQuery() (v url.Values)
URLQuery serializes BlockchainProviderBidListParams's query parameters as `url.Values`.
type BlockchainProviderBidService ¶
type BlockchainProviderBidService struct { Options []option.RequestOption Active *BlockchainProviderBidActiveService }
BlockchainProviderBidService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainProviderBidService method instead.
func NewBlockchainProviderBidService ¶
func NewBlockchainProviderBidService(opts ...option.RequestOption) (r *BlockchainProviderBidService)
NewBlockchainProviderBidService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainProviderBidService) List ¶
func (r *BlockchainProviderBidService) List(ctx context.Context, id string, query BlockchainProviderBidListParams, opts ...option.RequestOption) (res *shared.BidList, err error)
List bids for a provider
type BlockchainProviderNewParams ¶
type BlockchainProviderNewParams struct { // Endpoint URL of the provider Endpoint param.Field[string] `json:"endpoint,required"` // Amount to stake for the provider Stake param.Field[string] `json:"stake,required"` }
func (BlockchainProviderNewParams) MarshalJSON ¶
func (r BlockchainProviderNewParams) MarshalJSON() (data []byte, err error)
type BlockchainProviderService ¶
type BlockchainProviderService struct { Options []option.RequestOption Bids *BlockchainProviderBidService }
BlockchainProviderService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainProviderService method instead.
func NewBlockchainProviderService ¶
func NewBlockchainProviderService(opts ...option.RequestOption) (r *BlockchainProviderService)
NewBlockchainProviderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainProviderService) Delete ¶
func (r *BlockchainProviderService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a provider
func (*BlockchainProviderService) List ¶
func (r *BlockchainProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Provider, err error)
List providers
func (*BlockchainProviderService) New ¶
func (r *BlockchainProviderService) New(ctx context.Context, body BlockchainProviderNewParams, opts ...option.RequestOption) (res *Provider, err error)
Create a new provider
type BlockchainSendEthParams ¶
type BlockchainSendEthParams struct { // Amount of ETH to send Amount param.Field[string] `json:"amount,required"` // Ethereum address to send ETH to To param.Field[string] `json:"to,required"` }
func (BlockchainSendEthParams) MarshalJSON ¶
func (r BlockchainSendEthParams) MarshalJSON() (data []byte, err error)
type BlockchainSendMorParams ¶
type BlockchainSendMorParams struct { // Amount of MOR to send Amount param.Field[string] `json:"amount,required"` // Ethereum address to send MOR to To param.Field[string] `json:"to,required"` }
func (BlockchainSendMorParams) MarshalJSON ¶
func (r BlockchainSendMorParams) MarshalJSON() (data []byte, err error)
type BlockchainService ¶
type BlockchainService struct { Options []option.RequestOption Models *BlockchainModelService }
BlockchainService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainService method instead.
func NewBlockchainService ¶
func NewBlockchainService(opts ...option.RequestOption) (r *BlockchainService)
NewBlockchainService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainService) SendEth ¶
func (r *BlockchainService) SendEth(ctx context.Context, body BlockchainSendEthParams, opts ...option.RequestOption) (res *shared.Balance, err error)
Send ETH to a specified address
func (*BlockchainService) SendMor ¶
func (r *BlockchainService) SendMor(ctx context.Context, body BlockchainSendMorParams, opts ...option.RequestOption) (res *shared.Balance, err error)
Send MOR to a specified address
type BlockchainSessionNewParams ¶
type BlockchainSessionNewParams struct { // Approval identifier Approval param.Field[string] `json:"approval,required"` // Signature for the approval ApprovalSig param.Field[string] `json:"approvalSig,required"` // Stake amount for the session Stake param.Field[string] `json:"stake,required"` }
func (BlockchainSessionNewParams) MarshalJSON ¶
func (r BlockchainSessionNewParams) MarshalJSON() (data []byte, err error)
type BlockchainSessionProviderParams ¶
type BlockchainSessionProviderParams struct { // Provider identifier Provider param.Field[string] `query:"provider,required"` // Maximum number of results to return Limit param.Field[int64] `query:"limit"` // Number of results to skip Offset param.Field[int64] `query:"offset"` }
func (BlockchainSessionProviderParams) URLQuery ¶
func (r BlockchainSessionProviderParams) URLQuery() (v url.Values)
URLQuery serializes BlockchainSessionProviderParams's query parameters as `url.Values`.
type BlockchainSessionService ¶
type BlockchainSessionService struct {
Options []option.RequestOption
}
BlockchainSessionService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainSessionService method instead.
func NewBlockchainSessionService ¶
func NewBlockchainSessionService(opts ...option.RequestOption) (r *BlockchainSessionService)
NewBlockchainSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainSessionService) Budget ¶
func (r *BlockchainSessionService) Budget(ctx context.Context, opts ...option.RequestOption) (res *Budget, err error)
Get session budget
func (*BlockchainSessionService) Close ¶
func (r *BlockchainSessionService) Close(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Close a session
func (*BlockchainSessionService) Get ¶
func (r *BlockchainSessionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *shared.Session, err error)
Retrieve a session
func (*BlockchainSessionService) New ¶
func (r *BlockchainSessionService) New(ctx context.Context, body BlockchainSessionNewParams, opts ...option.RequestOption) (res *shared.Session, err error)
Create a new session
func (*BlockchainSessionService) Provider ¶
func (r *BlockchainSessionService) Provider(ctx context.Context, query BlockchainSessionProviderParams, opts ...option.RequestOption) (res *SessionList, err error)
List provider sessions
func (*BlockchainSessionService) User ¶
func (r *BlockchainSessionService) User(ctx context.Context, query BlockchainSessionUserParams, opts ...option.RequestOption) (res *SessionList, err error)
List user sessions
type BlockchainSessionUserParams ¶
type BlockchainSessionUserParams struct { // User identifier User param.Field[string] `query:"user,required"` // Maximum number of results to return Limit param.Field[int64] `query:"limit"` // Number of results to skip Offset param.Field[int64] `query:"offset"` }
func (BlockchainSessionUserParams) URLQuery ¶
func (r BlockchainSessionUserParams) URLQuery() (v url.Values)
URLQuery serializes BlockchainSessionUserParams's query parameters as `url.Values`.
type BlockchainTokenService ¶
type BlockchainTokenService struct { Options []option.RequestOption Supply *BlockchainTokenSupplyService }
BlockchainTokenService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainTokenService method instead.
func NewBlockchainTokenService ¶
func NewBlockchainTokenService(opts ...option.RequestOption) (r *BlockchainTokenService)
NewBlockchainTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BlockchainTokenSupplyService ¶
type BlockchainTokenSupplyService struct {
Options []option.RequestOption
}
BlockchainTokenSupplyService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainTokenSupplyService method instead.
func NewBlockchainTokenSupplyService ¶
func NewBlockchainTokenSupplyService(opts ...option.RequestOption) (r *BlockchainTokenSupplyService)
NewBlockchainTokenSupplyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainTokenSupplyService) Get ¶
func (r *BlockchainTokenSupplyService) Get(ctx context.Context, opts ...option.RequestOption) (res *TokenSupply, err error)
Get token supply
type BlockchainTransactionService ¶
type BlockchainTransactionService struct {
Options []option.RequestOption
}
BlockchainTransactionService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockchainTransactionService method instead.
func NewBlockchainTransactionService ¶
func NewBlockchainTransactionService(opts ...option.RequestOption) (r *BlockchainTransactionService)
NewBlockchainTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockchainTransactionService) List ¶
func (r *BlockchainTransactionService) List(ctx context.Context, opts ...option.RequestOption) (res *TransactionList, err error)
List transactions
type Budget ¶
type Budget struct { // Current session budget Budget string `json:"budget,required"` JSON budgetJSON `json:"-"` }
func (*Budget) UnmarshalJSON ¶
type ClaimableBalance ¶
type ClaimableBalance struct { // Amount claimable by the provider Balance string `json:"balance,required"` JSON claimableBalanceJSON `json:"-"` }
func (*ClaimableBalance) UnmarshalJSON ¶
func (r *ClaimableBalance) UnmarshalJSON(data []byte) (err error)
type Client ¶
type Client struct { Options []option.RequestOption Blockchains *BlockchainService BlockchainBids *BlockchainBidService BlockchainSessions *BlockchainSessionService Blockchain *BlockchainService Proxy *ProxyService }
Client creates a struct with services and top level methods that help with interacting with the morpheus-marketplace API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (X_API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type LatestBlock ¶
type LatestBlock struct { // Latest block number on the blockchain BlockNumber string `json:"blockNumber,required"` JSON latestBlockJSON `json:"-"` }
func (*LatestBlock) UnmarshalJSON ¶
func (r *LatestBlock) UnmarshalJSON(data []byte) (err error)
type Model ¶
type Model struct { // Unique identifier of the model ID string `json:"id,required"` // Fee for using the model Fee string `json:"fee,required"` // IPFS ID where the model is stored IpfsID string `json:"ipfsID,required"` // Model ID provided by the user ModelID string `json:"modelID,required"` // Name of the model Name string `json:"name,required"` // Amount staked for the model Stake string `json:"stake,required"` // Tags associated with the model Tags []string `json:"tags"` JSON modelJSON `json:"-"` }
func (*Model) UnmarshalJSON ¶
type ModelStats ¶
type ModelStats struct { // ID of the model ModelID string `json:"modelID,required"` // Statistics related to the model Stats map[string]interface{} `json:"stats,required"` JSON modelStatsJSON `json:"-"` }
func (*ModelStats) UnmarshalJSON ¶
func (r *ModelStats) UnmarshalJSON(data []byte) (err error)
type Provider ¶
type Provider struct { // Unique identifier of the provider ID string `json:"id,required"` // Endpoint URL of the provider Endpoint string `json:"endpoint,required"` // Amount staked by the provider Stake string `json:"stake,required"` JSON providerJSON `json:"-"` }
func (*Provider) UnmarshalJSON ¶
type ProxyService ¶
type ProxyService struct { Options []option.RequestOption Sessions *ProxySessionService }
ProxyService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProxyService method instead.
func NewProxyService ¶
func NewProxyService(opts ...option.RequestOption) (r *ProxyService)
NewProxyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ProxySessionInitiateParams ¶
type ProxySessionInitiateParams struct { // Model ID to initiate session with ModelID param.Field[string] `json:"modelId,required"` // Duration of the session SessionDuration param.Field[string] `json:"sessionDuration,required"` }
func (ProxySessionInitiateParams) MarshalJSON ¶
func (r ProxySessionInitiateParams) MarshalJSON() (data []byte, err error)
type ProxySessionProviderClaimParams ¶
type ProxySessionProviderClaimParams struct { // Claim identifier Claim param.Field[string] `json:"claim,required"` }
func (ProxySessionProviderClaimParams) MarshalJSON ¶
func (r ProxySessionProviderClaimParams) MarshalJSON() (data []byte, err error)
type ProxySessionService ¶
type ProxySessionService struct {
Options []option.RequestOption
}
ProxySessionService contains methods and other services that help with interacting with the morpheus-marketplace API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProxySessionService method instead.
func NewProxySessionService ¶
func NewProxySessionService(opts ...option.RequestOption) (r *ProxySessionService)
NewProxySessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProxySessionService) Initiate ¶
func (r *ProxySessionService) Initiate(ctx context.Context, body ProxySessionInitiateParams, opts ...option.RequestOption) (res *shared.Session, err error)
Initiate a proxy session
func (*ProxySessionService) ProviderClaim ¶
func (r *ProxySessionService) ProviderClaim(ctx context.Context, id string, body ProxySessionProviderClaimParams, opts ...option.RequestOption) (res *ClaimableBalance, err error)
Claim provider balance
func (*ProxySessionService) ProviderClaimableBalance ¶
func (r *ProxySessionService) ProviderClaimableBalance(ctx context.Context, id string, opts ...option.RequestOption) (res *ClaimableBalance, err error)
Get provider claimable balance
type SessionList ¶
type SessionList struct { // List of sessions Sessions []shared.Session `json:"sessions,required"` JSON sessionListJSON `json:"-"` }
func (*SessionList) UnmarshalJSON ¶
func (r *SessionList) UnmarshalJSON(data []byte) (err error)
type TokenSupply ¶
type TokenSupply struct { // Total supply of the token Supply string `json:"supply,required"` JSON tokenSupplyJSON `json:"-"` }
func (*TokenSupply) UnmarshalJSON ¶
func (r *TokenSupply) UnmarshalJSON(data []byte) (err error)
type TransactionList ¶
type TransactionList struct { // List of transactions Transactions []TransactionListTransaction `json:"transactions,required"` JSON transactionListJSON `json:"-"` }
func (*TransactionList) UnmarshalJSON ¶
func (r *TransactionList) UnmarshalJSON(data []byte) (err error)
type TransactionListTransaction ¶
type TransactionListTransaction struct { // Transaction ID ID string `json:"id,required"` // Amount involved in the transaction Amount string `json:"amount,required"` // Type of transaction Type string `json:"type,required"` JSON transactionListTransactionJSON `json:"-"` }
func (*TransactionListTransaction) UnmarshalJSON ¶
func (r *TransactionListTransaction) UnmarshalJSON(data []byte) (err error)
Source Files
¶
- aliases.go
- blockchain.go
- blockchainallowance.go
- blockchainbalance.go
- blockchainbid.go
- blockchainlatestblock.go
- blockchainmodel.go
- blockchainmodelbid.go
- blockchainmodelbidactive.go
- blockchainmodelbidrated.go
- blockchainmodelsession.go
- blockchainmodelstat.go
- blockchainprovider.go
- blockchainproviderbid.go
- blockchainproviderbidactive.go
- blockchainsession.go
- blockchaintoken.go
- blockchaintokensupply.go
- blockchaintransaction.go
- client.go
- field.go
- proxy.go
- proxysession.go