assets

package
v0.5.1-beta-hotfix1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const INDEX_TOKEN_SIZE = 3
View Source
const SUB_INDEX_TOKEN_SIZE = 2
View Source
const USED_BY_SPA = "SPA"

Variables

View Source
var AssetsDefinition map[string]*AssetDefinition = make(map[string]*AssetDefinition)
View Source
var PROXYHTTP string
View Source
var State *assetsState

var CurrentUpgradeState UpgradeStateType var LastUpgradeState UpgradeStateType

Functions

func GenerateIndexFromFile

func GenerateIndexFromFile(term string) error

func UpgradeAssets

func UpgradeAssets(force bool, skipdownload bool) error

Types

type AssetDefinition

type AssetDefinition struct {
	Name               string
	FreshItem          func() interface{}
	MarshallIndentItem func(interface{}) string
	Filters            []AssetDefinitionFilter
	LookPath           []string
	IndexPath          string
	SubIndexPath       string
	FilePath           string
	Alias              [][]string
}

type AssetDefinitionFilter

type AssetDefinitionFilter func(interface{}, url.Values) bool

type AssetDefinitionFilterTerms

type AssetDefinitionFilterTerms map[string][]string

func (AssetDefinitionFilterTerms) Get

type AssetRemoteDescription

type AssetRemoteDescription struct {
	ID      string `json:"id"`
	UsedBy  string `json:"used_by"`
	Hash    string `json:"hash"`
	URL     string `json:"url"`
	Version string `json:"version"`
}

type CustomAwsImage

type CustomAwsImage struct {
	Architecture       *string           `json:"Architecture"`
	CreationDate       *string           `json:"CreationDate"`
	Description        *string           `json:"Description"`
	EnaSupport         *bool             `json:"EnaSupport"`
	Hypervisor         *string           `json:"Hypervisor"`
	ImageType          *string           `json:"ImageType"`
	Name               *string           `json:"Name"`
	OwnerId            *string           `json:"OwnerId"`
	PlatformDetails    *string           `json:"PlatformDetails"`
	VirtualizationType *string           `json:"VirtualizationType"`
	ImageIds           map[string]string `json:"ImageIds"`
	ImageId            *string           `json:"ImageId"`
}

type SearchRequest

type SearchRequest struct {
	SearchTerm  string
	FilterTerms url.Values
	Limit       int
	Offset      int
	Sort        string
}

func (*SearchRequest) Validate

func (s *SearchRequest) Validate() (bool, error)

type SearchResult

type SearchResult struct {
	Count   int           `json:"count"`
	Results []interface{} `json:"results"`
}
func Search(sr *SearchRequest, assetdef *AssetDefinition) (*SearchResult, error)

type UpgradeStateType

type UpgradeStateType int
const (
	UpgradeStateNone UpgradeStateType = iota
	UpgradeStateInProgress
	UpgradeStateInProgressWithErr
	UpgradeStateEndWithErr
	UpgradeStateEndOK
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL