Documentation ¶
Index ¶
- Constants
- Variables
- type AppEntry
- type Client
- func (c *Client) CreateApp(ctx context.Context, username, password, cid string, ...) (*CreateAppResult, error)
- func (c *Client) DownloadApp(ctx context.Context, cid string, archiveFormat bundle.ArchiveExt) (bundle.Bundle, string, error)
- func (c *Client) GetApp(ctx context.Context, appID int) (*GetAppResult, error)
- func (c *Client) ReleaseApp(ctx context.Context, username, password string, appID int, cid string, ...) (*ReleaseAppResult, error)
- func (c *Client) SearchApps(ctx context.Context, search string) (*SearchAppsResult, error)
- type CreateAppResult
- type GetAppResult
- type JSONTime
- type Option
- type OptionFunc
- type ReleaseAppResult
- type SearchAppsResult
Constants ¶
View Source
const ( DefaultTimeout = 30 * time.Second DefaultRetryMax = 3 DefaultIPFSGatewayURL = "https://ipfs.io" DefaultMarketURL = "http://localhost:3002" )
View Source
const ( ErrCodeBadRequest api.ErrorCode = "bad-request" ErrCodeNotFound api.ErrorCode = "not-found" ErrCodeInternalServerError api.ErrorCode = "internal-server-error" ErrCodeAccountAlreadyExists api.ErrorCode = "account-already-exists" ErrCodeAppAlreadyExists api.ErrorCode = "app-already-exists" ErrCodeReleaseAlreadyExists api.ErrorCode = "release-already-exists" ErrCodeStalledVersion api.ErrorCode = "stalled-version" ErrCodeForbidden api.ErrorCode = "forbidden" ErrCodeRegistrationDisabled api.ErrorCode = "registration-disabled" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(funcs ...OptionFunc) *Client
func (*Client) CreateApp ¶
func (c *Client) CreateApp(ctx context.Context, username, password, cid string, archiveFormat bundle.ArchiveExt) (*CreateAppResult, error)
func (*Client) DownloadApp ¶
func (*Client) ReleaseApp ¶
func (c *Client) ReleaseApp(ctx context.Context, username, password string, appID int, cid string, archiveFormat bundle.ArchiveExt) (*ReleaseAppResult, error)
func (*Client) SearchApps ¶
type CreateAppResult ¶
type CreateAppResult struct {
App *AppEntry
}
type GetAppResult ¶
type GetAppResult struct {
App *AppEntry
}
type JSONTime ¶
func (*JSONTime) UnmarshalJSON ¶
returns time.Now() no matter what!
type OptionFunc ¶
type OptionFunc func(*Option)
func WithIPFSGatewayURL ¶
func WithIPFSGatewayURL(ipfsGatewayURL string) OptionFunc
func WithMarketURL ¶
func WithMarketURL(marketURL string) OptionFunc
func WithRetryMax ¶
func WithRetryMax(retryMax int) OptionFunc
func WithTimeout ¶
func WithTimeout(timeout time.Duration) OptionFunc
type ReleaseAppResult ¶
type ReleaseAppResult struct {
App *AppEntry
}
type SearchAppsResult ¶
type SearchAppsResult struct {
Apps []*AppEntry
}
Click to show internal directories.
Click to hide internal directories.