Documentation
¶
Index ¶
- Constants
- func DecodeAnyEnvSpec(repoType string, envSpec string) (repointerface.EnvSpec, error)
- func DecodeAnySpecifier(repoType string, specifier string) (repointerface.Constraint, error)
- func DecodeSpecSheet(raw []byte) (spec repointerface.SpecSheet, err error)
- func NormalizeAnyName(repoType string, name string) string
- func ParseAnyVersion(repoType string, version string) (repointerface.Version, error)
- func PostSpecSheet(baseURL string, specSheet repointerface.SpecSheet) (prefabID string, blueprintID string, err error)
- type FileInfo
- type FileStore
- func (f *FileStore) AddFile(file io.ReadCloser, targetPath string, id string, fileInfo FileInfo, ...) (err error)
- func (f *FileStore) DeleteFile(id string) (err error)
- func (f *FileStore) NewFile(path string, fileType string) (id string, err error)
- func (f *FileStore) WaitDownload(ids []string) (err error)
- type InfoStore
- func (i *InfoStore) DeleteItem(repo string, name string, version string, environment string) (err error)
- func (i *InfoStore) GetEnvironments(repo string, name string, version string) (environments []string, outdated bool)
- func (i *InfoStore) GetItem(repo string, name string, version string, environment string) (prefabID, blueprintID string)
- func (i *InfoStore) GetNames(repo string) (names []string, outdated bool)
- func (i *InfoStore) GetVersions(repo string, name string) (versions []string, outdated bool)
- func (i *InfoStore) SetEnvironments(repo string, name string, version string, environments []string) (err error)
- func (i *InfoStore) SetItem(repo string, name string, version string, environment string, prefabID string, ...) (err error)
- func (i *InfoStore) SetNames(repo string, names []string) (err error)
- func (i *InfoStore) SetVersions(repo string, name string, versions []string) (err error)
- type ItemInfo
- type NameInfo
- type PrefabService
- func NewPrefabService(workDir string, upstream string, fabricatePrefab bool, unpackPrefab bool, ...) (ps *PrefabService, err error)
- func NewProxyService(workDir string, upstream string) (ps *PrefabService, err error)
- func NewServerService(workDir string) (ps *PrefabService, err error)
- func NewUserService(workDir string, upstream string) (ps *PrefabService, err error)
- func (ps *PrefabService) GetUpstreamEnvironemnts(repository string, name string, version string) (environments []string, err error)
- func (ps *PrefabService) GetUpstreamFile(id string) (file io.ReadCloser, fileName string, fileType string, err error)
- func (ps *PrefabService) GetUpstreamItem(repository string, name string, version string, environment string) (prefabID string, blueprintID string, err error)
- func (ps *PrefabService) GetUpstreamNames(repository string) (names []string, err error)
- func (ps *PrefabService) GetUpstreamVersions(repository string, name string) (versions []string, err error)
- func (ps *PrefabService) HandleDeleteItem(repository string, name string, version string, environment string) (err error)
- func (ps *PrefabService) HandleGetEnvironments(repository string, name string, version string) (environments []string, err error)
- func (ps *PrefabService) HandleGetFile(id string) (path string, fileName string, fileType string, err error)
- func (ps *PrefabService) HandleGetItem(repository, name, version, environment string) (prefabID, blueprintID string, err error)
- func (ps *PrefabService) HandleGetNames(repository string) (names []string, err error)
- func (ps *PrefabService) HandleGetVersions(repository string, name string) (versions []string, err error)
- func (p *PrefabService) HandleList(writer io.Writer) (err error)
- func (ps *PrefabService) HandlePostSpecSheet(specSheet []byte) (prefabID string, blueprintID string, err error)
- func (ps *PrefabService) HandlePostUpload(repository, prefabPath, blueprintPath, fileType string) (prefabID, blueprintID string, err error)
- func (ps *PrefabService) PostUpload(repository string, prefabPath string, blueprintPath string) error
- func (ps *PrefabService) PostUpstreamSpecSheet(specSheet repointerface.SpecSheet) (prefabID string, blueprintID string, err error)
- func (ps *PrefabService) PrefabSelection(specSheet repointerface.SpecSheet) (prefabID string, blueprintID string, err error)
- func (ps *PrefabService) RequestBlueprint(repoType string, name string, specifier repointerface.Constraint, ...) (blueprint *prefab.Blueprint, blueprintID string, prefabID string, err error)
- func (ps *PrefabService) RequestClosure(name string, version string, dstDir string) (closureName string, err error)
- func (ps *PrefabService) RequestPrefabBlueprint(blueprintID string, prefabID string) (blueprint prefab.Blueprint, prefabPath string, err error)
- func (ps *PrefabService) SizeSum(ids []string) (size uint64, err error)
- func (ps *PrefabService) WaitDownload(ids []string) error
- type RepoInfo
- type VersionInfo
Constants ¶
View Source
const DOWNLOADING string = ""
View Source
const LONG_ENOUGH = time.Duration(1000000 * time.Hour)
View Source
const NEVER_OUTDATE = time.Duration(math.MaxInt64)
Variables ¶
This section is empty.
Functions ¶
func DecodeAnyEnvSpec ¶ added in v0.2.2
func DecodeAnyEnvSpec(repoType string, envSpec string) (repointerface.EnvSpec, error)
func DecodeAnySpecifier ¶ added in v0.2.2
func DecodeAnySpecifier(repoType string, specifier string) (repointerface.Constraint, error)
func DecodeSpecSheet ¶ added in v0.2.2
func DecodeSpecSheet(raw []byte) (spec repointerface.SpecSheet, err error)
func NormalizeAnyName ¶ added in v0.2.2
func ParseAnyVersion ¶ added in v0.2.2
func ParseAnyVersion(repoType string, version string) (repointerface.Version, error)
func PostSpecSheet ¶
Types ¶
type FileStore ¶
func NewFileStore ¶
func (*FileStore) DeleteFile ¶
func (*FileStore) WaitDownload ¶
type InfoStore ¶
type InfoStore struct {
Repos map[string]*RepoInfo `json:"repos"`
sync.RWMutex
// contains filtered or unexported fields
}
func NewInfoStore ¶
func (*InfoStore) DeleteItem ¶
func (*InfoStore) GetEnvironments ¶
func (*InfoStore) GetVersions ¶
func (*InfoStore) SetEnvironments ¶
type NameInfo ¶
type NameInfo struct {
Versions map[string]*VersionInfo `json:"versions"`
UpdateTime time.Time `json:"update"`
}
type PrefabService ¶
type PrefabService struct {
// contains filtered or unexported fields
}
func NewPrefabService ¶
func NewProxyService ¶
func NewProxyService(workDir string, upstream string) (ps *PrefabService, err error)
func NewServerService ¶
func NewServerService(workDir string) (ps *PrefabService, err error)
func NewUserService ¶
func NewUserService(workDir string, upstream string) (ps *PrefabService, err error)
func (*PrefabService) GetUpstreamEnvironemnts ¶
func (*PrefabService) GetUpstreamFile ¶
func (ps *PrefabService) GetUpstreamFile(id string) (file io.ReadCloser, fileName string, fileType string, err error)
func (*PrefabService) GetUpstreamItem ¶
func (*PrefabService) GetUpstreamNames ¶
func (ps *PrefabService) GetUpstreamNames(repository string) (names []string, err error)
func (*PrefabService) GetUpstreamVersions ¶
func (ps *PrefabService) GetUpstreamVersions(repository string, name string) (versions []string, err error)
func (*PrefabService) HandleDeleteItem ¶
func (*PrefabService) HandleGetEnvironments ¶
func (*PrefabService) HandleGetFile ¶
func (*PrefabService) HandleGetItem ¶
func (ps *PrefabService) HandleGetItem(repository, name, version, environment string) (prefabID, blueprintID string, err error)
func (*PrefabService) HandleGetNames ¶
func (ps *PrefabService) HandleGetNames(repository string) (names []string, err error)
func (*PrefabService) HandleGetVersions ¶
func (ps *PrefabService) HandleGetVersions(repository string, name string) (versions []string, err error)
func (*PrefabService) HandleList ¶
func (p *PrefabService) HandleList(writer io.Writer) (err error)
func (*PrefabService) HandlePostSpecSheet ¶
func (ps *PrefabService) HandlePostSpecSheet(specSheet []byte) (prefabID string, blueprintID string, err error)
func (*PrefabService) HandlePostUpload ¶
func (ps *PrefabService) HandlePostUpload(repository, prefabPath, blueprintPath, fileType string) (prefabID, blueprintID string, err error)
func (*PrefabService) PostUpload ¶ added in v0.2.2
func (ps *PrefabService) PostUpload(repository string, prefabPath string, blueprintPath string) error
func (*PrefabService) PostUpstreamSpecSheet ¶
func (ps *PrefabService) PostUpstreamSpecSheet(specSheet repointerface.SpecSheet) (prefabID string, blueprintID string, err error)
func (*PrefabService) PrefabSelection ¶
func (ps *PrefabService) PrefabSelection(specSheet repointerface.SpecSheet) (prefabID string, blueprintID string, err error)
func (*PrefabService) RequestBlueprint ¶
func (ps *PrefabService) RequestBlueprint(repoType string, name string, specifier repointerface.Constraint, ctx *dcontext.DeployContext) (blueprint *prefab.Blueprint, blueprintID string, prefabID string, err error)
func (*PrefabService) RequestClosure ¶ added in v0.2.2
func (*PrefabService) RequestPrefabBlueprint ¶
func (*PrefabService) SizeSum ¶ added in v0.2.3
func (ps *PrefabService) SizeSum(ids []string) (size uint64, err error)
func (*PrefabService) WaitDownload ¶
func (ps *PrefabService) WaitDownload(ids []string) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.