Versions in this module Expand all Collapse all v0 v0.0.1 Nov 29, 2026 Changes in this version + const CatalogueFirstParty + const CataloguePublic + const DefaultServer + const LegacyPublicServer + const LegacyServer + const PublicServer + var Catalogues = []string + var IDTypes = []string + var SupportedVersions = []string + func AdvertisedVersions(doc *WellKnown) []string + func ArtifactTypeForFile(path string) string + func ContentDigest(body []byte) string + func IsPublicServer(root string) bool + func IsURI(raw string) bool + func MediaTypeForFile(path string) string + func NormaliseDomain(in string) (string, error) + func PublicationBase(root string) string + func RootFrom(doc *WellKnown) string + func RootsFrom(doc *WellKnown) []string + func ServerForCatalogue(name string) (string, error) + func TEIForVersion(raw, version string) string + func ValidIDType(s string) (string, bool) + func VersionFromRoot(root string) string + type AccessPolicy struct + ObjectKind string + ObjectUUID string + SharedWith []ShareGrant + Visibility string + type AccessStatus struct + Declared *AccessPolicy + Effective AccessPolicy + InheritedFrom string + UUID string + type Artifact struct + CreatedDate string + Formats []Format + Name string + Type string + UUID string + Version int + type Candidate struct + Endpoint WellKnownEndpoint + Supported string + Version string + func RankCandidates(doc *WellKnown, supported []string) []Candidate + func (c Candidate) Root() string + type Checksum struct + AlgType string + AlgValue string + type Client struct + BaseURL string + Creds *auth.Credentials + Err error + HTTP *http.Client + PublishURL string + func New(baseURL string, creds *auth.Credentials) *Client + func (c *Client) AccessPolicy(ctx context.Context, uuid string) (*AccessStatus, error) + func (c *Client) AttachSignature(ctx context.Context, artifactUUID string, formatIndex int, sig map[string]any) error + func (c *Client) ComponentRelease(ctx context.Context, uuid string) (*ComponentReleaseDetail, error) + func (c *Client) CreateArtifact(ctx context.Context, collectionUUID, name, artifactType string, ...) (*Artifact, error) + func (c *Client) CreateComponent(ctx context.Context, name string, identifiers []Identifier, ...) (*Product, error) + func (c *Client) CreateComponentRelease(ctx context.Context, componentUUID, version, releaseDate string, ...) (*Release, error) + func (c *Client) CreateDistribution(ctx context.Context, componentReleaseUUID string, d Distribution, ...) (*Distribution, error) + func (c *Client) CreateProduct(ctx context.Context, name string, identifiers []Identifier, ...) (*Product, error) + func (c *Client) CreateProductRelease(ctx context.Context, productUUID, version, releaseDate string, preRelease bool, ...) (*Release, error) + func (c *Client) DeleteDistribution(ctx context.Context, uuid string) error + func (c *Client) DeleteObject(ctx context.Context, segment, uuid string) error + func (c *Client) DeleteProduct(ctx context.Context, uuid string) error + func (c *Client) Do(ctx context.Context, method, path string, body any, out any, ...) error + func (c *Client) DoPublish(ctx context.Context, method, path string, body any, out any, ...) error + func (c *Client) LatestCollection(ctx context.Context, releaseUUID string) (*Collection, error) + func (c *Client) ListComponents(ctx context.Context, o ListOptions) (*Page[Component], error) + func (c *Client) ListProducts(ctx context.Context, o ListOptions) (*Page[Product], error) + func (c *Client) Product(ctx context.Context, uuid string) (*Product, error) + func (c *Client) ProductReleases(ctx context.Context, uuid string) (*Page[Release], error) + func (c *Client) Products(ctx context.Context, pageSize int, pageToken string) (*Page[Product], error) + func (c *Client) Publications(ctx context.Context) ([]map[string]any, error) + func (c *Client) PublishCollection(ctx context.Context, releaseUUID string, reason UpdateReason) (*Collection, error) + func (c *Client) ResolvePURL(ctx context.Context, purl string) ([]DiscoveryInfo, error) + func (c *Client) ResolveTEI(ctx context.Context, tei string) ([]DiscoveryInfo, error) + func (c *Client) SetAccessPolicy(ctx context.Context, uuid string, policy AccessPolicy) (*AccessStatus, error) + func (c *Client) UploadArtifactFile(ctx context.Context, artifactUUID string, formatIndex int, ...) (map[string]any, error) + func (c *Client) Version() string + type Collection struct + Artifacts []Artifact + BelongsTo string + CreatedDate string + Date string + UUID string + UpdateReason *UpdateReason + Version int + func (c Collection) When() string + type Component struct + Identifiers []Identifier + Name string + UUID string + type ComponentReleaseDetail struct + LatestCollection Collection + Release struct{ ... } + func (d *ComponentReleaseDetail) UnmarshalJSON(b []byte) error + type DiscoveryInfo struct + ProductReleaseUUID string + Servers []ServerInfo + type Distribution struct + Checksums []Checksum + Description string + DistributionID string + Identifiers []Identifier + SignatureURL string + URL string + type Error struct + Code string + Field string + Message string + Status int + func (e *Error) Error() string + func (e *Error) IsInvalidPageToken() bool + func (e *Error) IsNoAcceptableFormat() bool + func (e *Error) IsNotFound() bool + func (e *Error) IsNotImplemented() bool + func (e *Error) IsSignatureNotFound() bool + type Format struct + Checksums []Checksum + Description string + MediaType string + SignatureURL string + URL string + type Identifier struct + IDType string + IDValue string + type ListOptions struct + IDType string + IDValue string + PageSize int + PageToken string + SortField string + SortOrder string + func (o ListOptions) Query() url.Values + type Page struct + HasNext bool + NextPageToken string + Results []T + type Product struct + Identifiers []Identifier + Name string + UUID string + type Release struct + Component string + ComponentName string + CreatedDate string + Identifiers []Identifier + PreRelease bool + Product string + ProductName string + ReleaseDate string + UUID string + Version string + type ServerInfo struct + Priority *float64 + RootURL string + Versions []string + type ShareGrant struct + ExpiresAt int64 + OrganizationName string + OrganizationUUID string + type TEI struct + Domain string + ID string + Type string + func ParseTEI(raw string) (TEI, bool) + func (t TEI) URI() string + func (t TEI) URN() string + type UpdateReason struct + Comment string + Type string + type WellKnown struct + Endpoints []WellKnownEndpoint + SchemaVersion int + func Discover(ctx context.Context, domainOrTEI string) (*WellKnown, string, error) + type WellKnownEndpoint struct + Priority *float64 + URL string + Versions []string