types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIVersions

type APIVersions struct {
	AvailableVersions struct {
		V3 string `json:"v3"`
	} `json:"available_versions"`
}

type ConfigFile

type ConfigFile struct {
	Dir    string `yaml:"dir"`
	Server struct {
		Galaxy map[string]struct {
			URL string `yaml:"url"`
			Dir string `yaml:"dir"`
		} `yaml:"galaxy"`
		PYPI   map[string]string `yaml:"pypi"`
		Static map[string]string `yaml:"static"`
	} `yaml:"server"`
}

func (*ConfigFile) Load

func (c *ConfigFile) Load(cfgFile string)

type GalaxyCollection

type GalaxyCollection struct {
	Href           string `json:"href"`
	Namespace      string `json:"namespace"`
	Name           string `json:"name"`
	Deprecated     bool   `json:"deprecated"`
	VersionsURL    string `json:"versions_url"`
	HighestVersion struct {
		Href    string `json:"href"`
		Version string `json:"version"`
	} `json:"highest_version"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	DownloadCount int       `json:"download_count"`
}

func (*GalaxyCollection) ReadFromJSONFile

func (c *GalaxyCollection) ReadFromJSONFile(filePath string) error

type GalaxyCollectionVersion

type GalaxyCollectionVersion struct {
	Version         string    `json:"version"`
	Href            string    `json:"href"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
	RequiresAnsible string    `json:"requires_ansible"`
	Marks           []any     `json:"marks"`
}

type GalaxyCollectionVersionInfo

type GalaxyCollectionVersionInfo struct {
	Version         string    `json:"version"`
	Href            string    `json:"href"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
	RequiresAnsible any       `json:"requires_ansible"`
	Marks           []any     `json:"marks"`
	Artifact        struct {
		Filename string `json:"filename"`
		Sha256   string `json:"sha256"`
		Size     int64  `json:"size"`
	} `json:"artifact"`
	Collection struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		Href string `json:"href"`
	} `json:"collection"`
	DownloadURL string `json:"download_url"`
	Name        string `json:"name"`
	Namespace   struct {
		Name           string `json:"name"`
		MetadataSha256 string `json:"metadata_sha256"`
	} `json:"namespace"`
	Signatures interface{} `json:"signatures"`
	Metadata   struct {
		Authors       []string          `json:"authors"`
		Contents      []any             `json:"contents"`
		Dependencies  map[string]string `json:"dependencies"`
		Description   string            `json:"description"`
		Documentation string            `json:"documentation"`
		Homepage      string            `json:"homepage"`
		Issues        string            `json:"issues"`
		License       []string          `json:"license"`
		Repository    string            `json:"repository"`
		Tags          []string          `json:"tags"`
	} `json:"metadata"`
	GitURL       any                                 `json:"git_url"`
	GitCommitSha any                                 `json:"git_commit_sha"`
	Manifest     GalaxyCollectionVersionInfoManifest `json:"manifest"`
	Files        GalaxyCollectionVersionInfoFiles    `json:"files"`
}

func (*GalaxyCollectionVersionInfo) ReadFromJSONFile

func (c *GalaxyCollectionVersionInfo) ReadFromJSONFile(filePath string) error

type GalaxyCollectionVersionInfoFiles

type GalaxyCollectionVersionInfoFiles struct {
	Files []struct {
		Name         string `json:"name"`
		Ftype        string `json:"ftype"`
		Format       int    `json:"format"`
		ChksumType   any    `json:"chksum_type"`
		ChksumSha256 any    `json:"chksum_sha256"`
	} `json:"files"`
	Format int `json:"format"`
}

type GalaxyCollectionVersionInfoManifest

type GalaxyCollectionVersionInfoManifest struct {
	Format         int `json:"format"`
	CollectionInfo struct {
		Name          string            `json:"name"`
		Issues        string            `json:"issues"`
		Authors       []string          `json:"authors"`
		License       []string          `json:"license"`
		Version       string            `json:"version"`
		Homepage      string            `json:"homepage"`
		Namespace     string            `json:"namespace"`
		Repository    string            `json:"repository"`
		Description   string            `json:"description"`
		Dependencies  map[string]string `json:"dependencies"`
		Documentation string            `json:"documentation"`
		Tags          []string          `json:"tags"`
		Readme        string            `json:"readme"`
	} `json:"collection_info"`
	FileManifestFile struct {
		Name         string `json:"name"`
		Ftype        string `json:"ftype"`
		Format       int    `json:"format"`
		ChksumType   string `json:"chksum_type"`
		ChksumSha256 string `json:"chksum_sha256"`
	} `json:"file_manifest_file"`
}

type GalaxyCollectionVersions

type GalaxyCollectionVersions struct {
	Meta struct {
		Count int `json:"count"`
	} `json:"meta"`
	Links struct {
		First    string `json:"first"`
		Previous string `json:"previous"`
		Next     string `json:"next"`
		Last     string `json:"last"`
	} `json:"links"`
	Data []GalaxyCollectionVersion `json:"data"`
}

func (*GalaxyCollectionVersions) ReadFromJSONFile

func (c *GalaxyCollectionVersions) ReadFromJSONFile(filePath, key, namespace, name string) error

type GalaxyLocal

type GalaxyLocal struct {
	Versions []VersionInfo
	Latest   VersionInfo
}

func (*GalaxyLocal) List

func (g *GalaxyLocal) List(dest, namespace, name string) error

type PypiMetadata

type PypiMetadata struct {
	Files []struct {
		CoreMetadata         interface{} `json:"core-metadata"`
		DataDistInfoMetadata interface{} `json:"data-dist-info-metadata"`
		Filename             string      `json:"filename"`
		Hashes               struct {
			Sha256 string `json:"sha256"`
		} `json:"hashes"`
		RequiresPython string      `json:"requires-python"`
		Size           int         `json:"size"`
		UploadTime     time.Time   `json:"upload-time"`
		URL            string      `json:"url"`
		Yanked         interface{} `json:"yanked"`
	} `json:"files"`
	Meta struct {
		LastSerial int    `json:"_last-serial"`
		APIVersion string `json:"api-version"`
	} `json:"meta"`
	Name     string   `json:"name"`
	Versions []string `json:"versions"`
}

func (*PypiMetadata) ReadFromJSONFile

func (p *PypiMetadata) ReadFromJSONFile(filePath string) error

type RequestHeaders

type RequestHeaders map[string]string

type VersionInfo

type VersionInfo struct {
	Version  string
	Time     time.Time
	Size     int64
	Filename string
}

Jump to

Keyboard shortcuts

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