Documentation
¶
Overview ¶
Package scalefunc implements the Schema type, as well as any helper functions for interacting with Schema types
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrVersion = errors.New("unknown or invalid version") ErrLanguage = errors.New("unknown or invalid language") ErrHash = errors.New("error while verifying hash") )
View Source
var ( // AcceptedVersions is an array of acceptable Versions AcceptedVersions = []Version{V1Alpha} // AcceptedLanguages is an array of acceptable Languages AcceptedLanguages = []Language{Go, Rust, TypeScript} )
View Source
var (
InvalidStringRegex = regexp.MustCompile(`[^A-Za-z0-9-.]`)
)
Functions ¶
func ValidString ¶
ValidString returns true if the string is valid for use with Scale Functions
Types ¶
type Dependency ¶
type Dependency struct { Name string `json:"name" yaml:"name"` Version string `json:"version" yaml:"version"` Metadata map[string]string `json:"metadata" yaml:"metadata"` }
Dependency is a dependency of a compiled Scale Function
type Schema ¶
type Schema struct { Version Version `json:"version" yaml:"version"` Name string `json:"name" yaml:"name"` Tag string `json:"tag" yaml:"tag"` SignatureName string `json:"signature_name" yaml:"signature_name"` SignatureSchema *signatureSchema.Schema `json:"signature_schema" yaml:"signature_schema"` SignatureHash string `json:"signature_hash" yaml:"signature_hash"` Language Language `json:"language" yaml:"language"` Stateless bool `json:"stateless" yaml:"stateless"` Dependencies []Dependency `json:"dependencies" yaml:"dependencies"` Function []byte `json:"function" yaml:"function"` Size uint32 `json:"size" yaml:"size"` Hash string `json:"hash" yaml:"hash"` }
Schema is the type used to define the requirements of a scale function for a Scale Runtime
Click to show internal directories.
Click to hide internal directories.