Documentation ¶
Index ¶
- type Client
- func (client *Client) Close()
- func (client *Client) CreateOrganization(ctx context.Context, meta *types.OrganizationMeta) (*valist.ValistOrgCreated, error)
- func (client *Client) CreateRepository(ctx context.Context, orgID common.Hash, name string, ...) (*valist.ValistRepoCreated, error)
- func (client *Client) GetLatestRelease(ctx context.Context, orgID common.Hash, repoName string) (*types.Release, error)
- func (client *Client) GetOrganization(ctx context.Context, id common.Hash) (*types.Organization, error)
- func (client *Client) GetOrganizationID(ctx context.Context, name string) (common.Hash, error)
- func (client *Client) GetOrganizationMeta(ctx context.Context, id cid.Cid) (*types.OrganizationMeta, error)
- func (client *Client) GetRelease(ctx context.Context, orgID common.Hash, repoName, tag string) (*types.Release, error)
- func (client *Client) GetRepository(ctx context.Context, orgID common.Hash, repoName string) (*types.Repository, error)
- func (client *Client) GetRepositoryMeta(ctx context.Context, id cid.Cid) (*types.RepositoryMeta, error)
- func (client *Client) LinkOrganizationName(ctx context.Context, orgID common.Hash, name string) (*registry.ValistRegistryMappingEvent, error)
- func (client *Client) ListReleaseTags(orgID common.Hash, repoName string, page, limit *big.Int) types.ReleaseTagIterator
- func (client *Client) ListReleases(orgID common.Hash, repoName string, page, limit *big.Int) types.ReleaseIterator
- func (client *Client) ReadFile(ctx context.Context, id cid.Cid) ([]byte, error)
- func (client *Client) SetRepositoryMeta(ctx context.Context, orgID common.Hash, name string, ...) (*valist.ValistMetaUpdate, error)
- func (client *Client) VoteOrganizationThreshold(ctx context.Context, orgID common.Hash, threshold *big.Int) (*valist.ValistVoteThresholdEvent, error)
- func (client *Client) VoteRelease(ctx context.Context, orgID common.Hash, repoName string, ...) (*valist.ValistVoteReleaseEvent, error)
- func (client *Client) VoteRepositoryThreshold(ctx context.Context, orgID common.Hash, name string, threshold *big.Int) (*valist.ValistVoteThresholdEvent, error)
- func (client *Client) WriteDirEntries(ctx context.Context, base string, fpaths []string) (cid.Cid, error)
- func (client *Client) WriteFile(ctx context.Context, data []byte) (cid.Cid, error)
- func (client *Client) WriteFilePath(ctx context.Context, fpath string) (cid.Cid, error)
- type Close
- type Options
- type ReleaseIterator
- type ReleaseTagIterator
- type TransactOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Valist SDK client.
func (*Client) CreateOrganization ¶
func (client *Client) CreateOrganization(ctx context.Context, meta *types.OrganizationMeta) (*valist.ValistOrgCreated, error)
func (*Client) CreateRepository ¶
func (client *Client) CreateRepository(ctx context.Context, orgID common.Hash, name string, meta *types.RepositoryMeta) (*valist.ValistRepoCreated, error)
CreateRepository creates a repository in the organization with the given orgID.
func (*Client) GetLatestRelease ¶
func (client *Client) GetLatestRelease(ctx context.Context, orgID common.Hash, repoName string) (*types.Release, error)
GetLatestRelease returns the latest release from the repository with the given name and orgID.
func (*Client) GetOrganization ¶
func (client *Client) GetOrganization(ctx context.Context, id common.Hash) (*types.Organization, error)
GetOrganization returns the organization with the given ID.
func (*Client) GetOrganizationID ¶
GetOrganizationID returns the ID of the organization with the given name.
func (*Client) GetOrganizationMeta ¶
func (client *Client) GetOrganizationMeta(ctx context.Context, id cid.Cid) (*types.OrganizationMeta, error)
GetOrganizationMeta returns the organization meta with the given CID.
func (*Client) GetRelease ¶
func (client *Client) GetRelease(ctx context.Context, orgID common.Hash, repoName, tag string) (*types.Release, error)
GetRelease returns the release with the given tag in the repository with the given name and orgID.
func (*Client) GetRepository ¶
func (client *Client) GetRepository(ctx context.Context, orgID common.Hash, repoName string) (*types.Repository, error)
GetRepository returns the repository with the given orgID and name.
func (*Client) GetRepositoryMeta ¶
func (client *Client) GetRepositoryMeta(ctx context.Context, id cid.Cid) (*types.RepositoryMeta, error)
GetRepositoryMeta returns the repository meta with the given CID.
func (*Client) LinkOrganizationName ¶
func (client *Client) LinkOrganizationName(ctx context.Context, orgID common.Hash, name string) (*registry.ValistRegistryMappingEvent, error)
LinkOrganizationName creates a link from the given orgID to the given name.
func (*Client) ListReleaseTags ¶
func (client *Client) ListReleaseTags(orgID common.Hash, repoName string, page, limit *big.Int) types.ReleaseTagIterator
ListReleaseTags returns a new ReleaseTagIterator.
func (*Client) ListReleases ¶
func (client *Client) ListReleases(orgID common.Hash, repoName string, page, limit *big.Int) types.ReleaseIterator
ListReleases returns a new ReleaseIterator.
func (*Client) SetRepositoryMeta ¶
func (*Client) VoteOrganizationThreshold ¶
func (*Client) VoteRelease ¶
func (client *Client) VoteRelease(ctx context.Context, orgID common.Hash, repoName string, release *types.Release) (*valist.ValistVoteReleaseEvent, error)
VoteRelease votes on a release in the given organization's repository with the given release and meta CIDs.
func (*Client) VoteRepositoryThreshold ¶
func (*Client) WriteDirEntries ¶
type Options ¶
type Options struct { IPFS coreiface.CoreAPI Ethereum bind.DeployBackend ChainID *big.Int Valist *valist.Valist Registry *registry.ValistRegistry Account accounts.Account Wallet accounts.Wallet TransactOpts TransactOpts Transactor types.TransactorAPI OnClose []Close }
Options is used to set client options.
type ReleaseIterator ¶
type ReleaseIterator struct {
// contains filtered or unexported fields
}
ReleaseIterator is used to iterate releases.
type ReleaseTagIterator ¶
type ReleaseTagIterator struct {
// contains filtered or unexported fields
}
ReleaseTagIterator is used to iterate release tags.
type TransactOpts ¶
type TransactOpts func(account accounts.Account, wallet accounts.Wallet, chainID *big.Int) *bind.TransactOpts
TransactOpts is a function that returns transaction options for an Ethereum transaction.