Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { // SchemaVersion contains the schema version. SchemaVersion string `yaml:"schema_version"` }
Base is the common struct that all schemas must have.
func (Base) GetSchemaVersion ¶
GetSchemaVersion is a simple getter function of the schema version.
type BaseSchema ¶
type BaseSchema interface { Parse(data []byte) error GetSchemaVersion() string GetResources(string, string, *ConfigWorker) error }
BaseSchema is an interface that every schema should implement.
type ConfigWorker ¶
type ConfigWorker struct { Parser SchemaParser Downloader EntryDownloader ResourceMap mapset.MapSet FSUtil fs.Util }
ConfigWorker is a container of all COMMON things needed to do work on the configs.
type Entry ¶
type Entry struct { URL string `yaml:"url"` Revision string `yaml:"revision"` Path string `yaml:path"` }
Entry is a generic holder for handling the specific location and revision of a resource.
func (Entry) GetConfigFile ¶
GetConfigFile is a getter for the config file name. Will return DefaultConfigYaml value if none has been set.
type EntryDownloader ¶
EntryDownloader is a generic interface for how to download entries.
func NewVCSDownloader ¶
func NewVCSDownloader() EntryDownloader
NewVCSDownloader is a constructor for downloading entries using VCS methods.
type SchemaParser ¶
type SchemaParser interface {
ParseV1_0_0(data []byte) (BaseSchema, error)
}
SchemaParser is a generic interface that knows how parse different schema_versions.