Documentation
¶
Index ¶
- Constants
- func CanonicalHash(hash string) (string, error)
- func HashHex(hash string) (string, error)
- type BuildOptions
- type Bundle
- type FileRef
- type Manifest
- func BuildTarFromDir(dir string, website string) ([]byte, Manifest, error)
- func BuildTarFromDirWithOptions(dir string, website string, opts BuildOptions) ([]byte, Manifest, error)
- func BuildTarFromFileWithOptions(filePath string, website string, opts BuildOptions) ([]byte, Manifest, error)
- func BuildTarFromPath(sourcePath string, website string) ([]byte, Manifest, error)
- func BuildTarFromPathWithOptions(sourcePath string, website string, opts BuildOptions) ([]byte, Manifest, error)
- func ParseManifest(b []byte) (Manifest, error)
- type Resource
- type Source
- type ValidationError
Constants ¶
View Source
const ( ApplyModeFull = "full" ApplyModePartial = "partial" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalHash ¶
Types ¶
type BuildOptions ¶
type BuildOptions struct {
Source *Source
}
type Manifest ¶
type Manifest struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Mode string `json:"mode"`
Website string `json:"website"`
Source *Source `json:"source,omitempty"`
Resources []Resource `json:"resources"`
}
func BuildTarFromDir ¶
BuildTarFromDir validates a site directory and produces a full-apply tar bundle.
func BuildTarFromDirWithOptions ¶
func BuildTarFromDirWithOptions(dir string, website string, opts BuildOptions) ([]byte, Manifest, error)
BuildTarFromDirWithOptions validates a site directory and produces a full-apply tar bundle.
func BuildTarFromFileWithOptions ¶
func BuildTarFromFileWithOptions(filePath string, website string, opts BuildOptions) ([]byte, Manifest, error)
BuildTarFromFileWithOptions validates a supported site file path and produces a partial-apply tar bundle.
func BuildTarFromPath ¶
BuildTarFromPath validates a site directory or supported site file path and produces a bundle.
func BuildTarFromPathWithOptions ¶
func BuildTarFromPathWithOptions(sourcePath string, website string, opts BuildOptions) ([]byte, Manifest, error)
BuildTarFromPathWithOptions validates a site directory or supported site file path and produces a bundle.
func ParseManifest ¶
type Resource ¶
type Resource struct {
Kind string `json:"kind"`
Name string `json:"name"`
File string `json:"file,omitempty"`
Hash string `json:"hash,omitempty"`
Files []FileRef `json:"files,omitempty"`
ContentType string `json:"contentType,omitempty"`
Size int64 `json:"size,omitempty"`
Deleted bool `json:"deleted,omitempty"`
}
func (Resource) FileEntries ¶
type Source ¶
type ValidationError ¶
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.