Documentation ¶
Overview ¶
Package storage is used to store and retrieve built Scale Functions
Package storage is used to store and retrieve built Scale Functions ¶
Package storage is used to store and retrieve built Scale Functions ¶
Package storage is used to store and retrieve built Scale Functions ¶
Package storage is used to store and retrieve built Scale Functions and Scale Signatures
Index ¶
- Constants
- Variables
- func GenerateExtension(ext *extension.Schema, name string, tag string, org string, directory string) error
- func GenerateSignature(sig *signature.Schema, name string, tag string, org string, directory string) error
- type Build
- type BuildStorage
- type Extension
- type ExtensionStorage
- func (s *ExtensionStorage) Delete(name string, tag string, org string, hash string) error
- func (s *ExtensionStorage) Get(name string, tag string, org string, hash string) (*Extension, error)
- func (s *ExtensionStorage) List() ([]Extension, error)
- func (s *ExtensionStorage) Path(name string, tag string, org string, hash string) (string, error)
- func (s *ExtensionStorage) Put(name string, tag string, org string, sig *extension.Schema) error
- type Function
- type FunctionStorage
- func (s *FunctionStorage) Delete(name string, tag string, org string, hash string) error
- func (s *FunctionStorage) Get(name string, tag string, org string, hash string) (*Function, error)
- func (s *FunctionStorage) List() ([]Function, error)
- func (s *FunctionStorage) Put(name string, tag string, org string, sf *scalefunc.V1BetaSchema) error
- type Signature
- type SignatureStorage
- func (s *SignatureStorage) Delete(name string, tag string, org string, hash string) error
- func (s *SignatureStorage) Get(name string, tag string, org string, hash string) (*Signature, error)
- func (s *SignatureStorage) List() ([]Signature, error)
- func (s *SignatureStorage) Path(name string, tag string, org string, hash string) (string, error)
- func (s *SignatureStorage) Put(name string, tag string, org string, sig *signature.Schema) error
Constants ¶
const (
BuildDirectory = "builds"
)
const (
DefaultDirectory = ".config/scale"
)
const (
ExtensionDirectory = "extensions"
)
const (
FunctionDirectory = "functions"
)
const (
SignatureDirectory = "signatures"
)
Variables ¶
Functions ¶
Types ¶
type BuildStorage ¶
type BuildStorage struct {
Directory string
}
var (
DefaultBuild *BuildStorage
)
func NewBuild ¶
func NewBuild(baseDirectory string) (*BuildStorage, error)
func (*BuildStorage) Delete ¶
func (s *BuildStorage) Delete(b *Build) error
func (*BuildStorage) Mkdir ¶
func (s *BuildStorage) Mkdir() (*Build, error)
Mkdir creates and returns a new build directory
type ExtensionStorage ¶ added in v0.4.6
type ExtensionStorage struct {
Directory string
}
var (
DefaultExtension *ExtensionStorage
)
func NewExtension ¶ added in v0.4.6
func NewExtension(baseDirectory string) (*ExtensionStorage, error)
func (*ExtensionStorage) Delete ¶ added in v0.4.6
Delete removes the Scale Extension with the given name, tag, org, and hash
func (*ExtensionStorage) Get ¶ added in v0.4.6
func (s *ExtensionStorage) Get(name string, tag string, org string, hash string) (*Extension, error)
Get returns the Scale Extension with the given name, tag, and organization. The hash parameter is optional and can be used to check for a specific hash.
func (*ExtensionStorage) List ¶ added in v0.4.6
func (s *ExtensionStorage) List() ([]Extension, error)
List returns all the Scale Extensions stored in the storage
type Function ¶
type Function struct { Schema *scalefunc.V1BetaSchema Hash string Organization string }
type FunctionStorage ¶
type FunctionStorage struct {
Directory string
}
FunctionStorage is used to store and retrieve built Scale Functions
var (
DefaultFunction *FunctionStorage
)
func NewFunction ¶
func NewFunction(baseDirectory string) (*FunctionStorage, error)
func (*FunctionStorage) Delete ¶
Delete removes the Scale Function with the given name, tag, org, and hash
func (*FunctionStorage) Get ¶
Get returns the Scale Function with the given name, tag, and organization. The hash parameter is optional and can be used to check for a specific hash.
func (*FunctionStorage) List ¶
func (s *FunctionStorage) List() ([]Function, error)
List returns all the Scale Functions stored in the storage
func (*FunctionStorage) Put ¶
func (s *FunctionStorage) Put(name string, tag string, org string, sf *scalefunc.V1BetaSchema) error
Put stores the Scale Function with the given name, tag, organization, and hash
type SignatureStorage ¶
type SignatureStorage struct {
Directory string
}
var (
DefaultSignature *SignatureStorage
)
func NewSignature ¶
func NewSignature(baseDirectory string) (*SignatureStorage, error)
func (*SignatureStorage) Delete ¶
Delete removes the Scale Signature with the given name, tag, org, and hash
func (*SignatureStorage) Get ¶
func (s *SignatureStorage) Get(name string, tag string, org string, hash string) (*Signature, error)
Get returns the Scale Signature with the given name, tag, and organization. The hash parameter is optional and can be used to check for a specific hash.
func (*SignatureStorage) List ¶
func (s *SignatureStorage) List() ([]Signature, error)
List returns all the Scale Signatures stored in the storage