cargo

package
v1.20.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 18 Imported by: 3

Documentation

Index

Constants

View Source
const (
	IndexRepositoryName = "_cargo-index"
	ConfigFileName      = "config.json"
)

Variables

This section is empty.

Functions

func AddOrUpdatePackageIndex

func AddOrUpdatePackageIndex(ctx context.Context, doer, owner *user_model.User, packageID int64) error

func BuildPackageIndex added in v1.20.0

func BuildPackageIndex(ctx context.Context, p *packages_model.Package) (*bytes.Buffer, error)

func BuildPackagePath

func BuildPackagePath(name string) string

func InitializeIndexRepository

func InitializeIndexRepository(ctx context.Context, doer, owner *user_model.User) error

func RebuildIndex

func RebuildIndex(ctx context.Context, doer, owner *user_model.User) error

Types

type Config

type Config struct {
	DownloadURL string `json:"dl"`
	APIURL      string `json:"api"`
}

func BuildConfig added in v1.20.0

func BuildConfig(owner *user_model.User) *Config

type IndexVersionEntry

type IndexVersionEntry struct {
	Name         string                     `json:"name"`
	Version      string                     `json:"vers"`
	Dependencies []*cargo_module.Dependency `json:"deps"`
	FileChecksum string                     `json:"cksum"`
	Features     map[string][]string        `json:"features"`
	Yanked       bool                       `json:"yanked"`
	Links        string                     `json:"links,omitempty"`
}

Jump to

Keyboard shortcuts

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