Documentation
¶
Index ¶
- func CopyFile(src, dst string) (int64, error)
- func CreateDir(path string) error
- func DownloadFile(url string, filepath string) error
- func ReadFile(filePath string) ([]string, error)
- func WriteArchitectureFile(filePath string, arch Architecture) error
- type Architecture
- type Data
- type GpgPublicKey
- type Platform
- type Provider
- type ShaSum
- type ShaSums
- type SigningKey
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile will download a url and store it in local filepath. It writes to the destination file as it downloads it, without loading the entire file into memory.
func WriteArchitectureFile ¶
func WriteArchitectureFile(filePath string, arch Architecture) error
Types ¶
type Architecture ¶
type Architecture struct {
Protocols []string `json:"protocols"`
OS string `json:"os"`
Arch string `json:"arch"`
FileName string `json:"filename"`
DownloadUrl string `json:"download_url"`
ShaSumsUrl string `json:"shasums_url"`
ShaSumsSignatureUrl string `json:"shasums_signature_url"`
ShaSum string `json:"shasum"`
SigningKeys SigningKey `json:"signing_keys"`
}
type Data ¶
func (*Data) AddVersion ¶
func (*Data) LoadFromFile ¶
func (*Data) LoadFromUrl ¶
func (*Data) WriteToFile ¶
type GpgPublicKey ¶
type Provider ¶
type Provider struct {
RootPath string
Namespace string
Provider string
DistPath string
RepoName string
Version string
GpgFingerprint string
GpgPubKeyFile string
Domain string
}
func (*Provider) CreateArchitectureFiles ¶
func (*Provider) CreateV1Dir ¶
func (*Provider) CreateWellKnown ¶
func (*Provider) GetShaSums ¶
func (*Provider) ReadGpgFile ¶
type SigningKey ¶
type SigningKey struct {
GpgPublicKeys []GpgPublicKey `json:"gpg_public_keys"`
}
type Version ¶
type Version struct {
Version string `json:"version"`
Protocols []string `json:"protocols"`
Platforms []Platform `json:"platforms"`
}
func (*Version) AddPlatform ¶
func (*Version) AddProtocol ¶
Click to show internal directories.
Click to hide internal directories.