Documentation ¶
Index ¶
Constants ¶
View Source
const (
// MetaFileName is the name of metadata file.
MetaFileName = "meta.yml"
)
Variables ¶
This section is empty.
Functions ¶
func IsChecksumError ¶ added in v0.6.0
IsChecksumError returns that the type of err matches InvalidChecksumError type or not.
Types ¶
type Binary ¶
type Binary struct { Name string `yaml:"name"` Checksum string `yaml:"checksum"` Mode os.FileMode `yaml:"mode"` Body io.Reader `yaml:"-"` }
Binary represents the binary file within release.
func BuildBinary ¶
BuildBinary builds a Binary object. Return error if it is failed to calculate checksum of the body.
func (*Binary) CopyAndValidateChecksum ¶ added in v0.6.0
CopyAndValidateChecksum copies src to dst and calculate checksum of src, then check it.
type InvalidChecksumError ¶ added in v0.6.0
type InvalidChecksumError struct {
// contains filtered or unexported fields
}
InvalidChecksumError represents an error of the checksum.
func (*InvalidChecksumError) Error ¶ added in v0.6.0
func (e *InvalidChecksumError) Error() string
Error returns the error message for InvalidChecksumError.
type Meta ¶
type Meta struct {
Binaries []*Binary `yaml:"binaries"`
}
Meta represents metadata of a release.
type Release ¶
Release represents a `<host>/<user>/<project>/<timestamp>/` layout.
func (*Release) MetaPath ¶ added in v0.4.0
MetaPath returns the meta file path within the release. eg. [`<host>/<user>/<project>/<timestamp>/meta.yml`]
Click to show internal directories.
Click to hide internal directories.