api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, r *mux.Router, domain, repo string) error

Types

type Client

type Client interface {
	Login(ctx context.Context) error
	Repositories(ctx context.Context) ([]*Repository, error)
	Packages(ctx context.Context, typ string) ([]storage.Artifact, error)
}

func NewClient

func NewClient(registry string, repo string, opts ...hclient.Option) (Client, error)

type Repository

type Repository struct {
	Name        string     `json:"name,omitempty"`
	Type        string     `json:"type"`
	Size        int64      `json:"size"`
	LastUpdated *time.Time `json:"lastUpdated"`
	Metadata    Stats      `json:"metadata"`
	Packages    Stats      `json:"packages"`
}

type Stats

type Stats struct {
	Size  int64 `json:"size"`
	Count int64 `json:"count"`
}

Jump to

Keyboard shortcuts

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