Documentation ¶
Index ¶
- Constants
- type App
- func (app *App) ApplyOwner() error
- func (app *App) File(filename string) (string, error)
- func (app *App) InvokeAction(ctx context.Context, name string) (string, error)
- func (app *App) ListActions() ([]string, error)
- func (app *App) ManifestFile() string
- func (app *App) ReadFile(filename string) ([]byte, error)
- func (app *App) Run(ctx context.Context, tracker stats.Recorder, creds *syscall.Credential, ...)
- func (app *App) Touch(filename string, dir bool) error
- func (app *App) WriteFile(filename string, content []byte) error
- type Project
- func (project *Project) ApplyConfig(cfg ProjectConfig) error
- func (project *Project) Create(ctx context.Context) (*App, error)
- func (project *Project) CreateFromTemplate(ctx context.Context, template *templates.Template) (*App, error)
- func (project *Project) Credentials() *syscall.Credential
- func (project *Project) Download(ctx context.Context, uid string, tarGzBall io.Writer) error
- func (project *Project) FindApp(uid string) *App
- func (project *Project) FindAppByAlias(alias string) *App
- func (project *Project) Handler(ctx context.Context, tracker stats.Recorder) (http.HandlerFunc, error)
- func (project *Project) HandlerAlias(ctx context.Context, tracker stats.Recorder) (http.HandlerFunc, error)
- func (project *Project) Link(uid string, alias string) (*App, error)
- func (project *Project) List() []*App
- func (project *Project) Remove(ctx context.Context, uid string) error
- func (project *Project) Root() string
- func (project *Project) Save() error
- func (project *Project) Unlink(alias string) (*App, error)
- func (project *Project) Upload(ctx context.Context, uid string, tarGzBall io.Reader) error
- type ProjectConfig
Constants ¶
View Source
const (
ManifestFile = "manifest.json"
)
View Source
const (
ProjectManifest = "project.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { UID string `json:"uid"` Manifest types.Manifest `json:"manifest"` // contains filtered or unexported fields }
func (*App) ApplyOwner ¶
func (*App) InvokeAction ¶ added in v0.2.2
Invoke action by name (make target)
func (*App) ListActions ¶ added in v0.2.2
List Make actions (if Makefile defined)
func (*App) ManifestFile ¶
type Project ¶
type Project struct { ProjectConfig // contains filtered or unexported fields }
func OpenProject ¶
func OpenProject(location string, defaultConfig ProjectConfig) (*Project, error)
func (*Project) ApplyConfig ¶
func (project *Project) ApplyConfig(cfg ProjectConfig) error
Replace project config and do necessary updates.
If user changed - update all credentials in project and in apps, apply ownership for all files
func (*Project) CreateFromTemplate ¶
func (*Project) Credentials ¶
func (project *Project) Credentials() *syscall.Credential
func (*Project) FindAppByAlias ¶ added in v0.2.3
func (*Project) Handler ¶
func (project *Project) Handler(ctx context.Context, tracker stats.Recorder) (http.HandlerFunc, error)
Handler for incoming requests
func (*Project) HandlerAlias ¶ added in v0.2.3
func (project *Project) HandlerAlias(ctx context.Context, tracker stats.Recorder) (http.HandlerFunc, error)
Handler for incoming requests
type ProjectConfig ¶
type ProjectConfig struct { User string `json:"user"` // user that will be used for jobs UnTar []string `json:"untar,omitempty"` // custom tar zxf command Tar []string `json:"tar,omitempty"` // custom tar zcf command }
func (*ProjectConfig) Credentials ¶
func (project *ProjectConfig) Credentials() (*syscall.Credential, error)
func (*ProjectConfig) LoadOrCreate ¶
func (project *ProjectConfig) LoadOrCreate(file string) (*Project, error)
func (*ProjectConfig) TarCommand ¶
func (project *ProjectConfig) TarCommand() []string
func (*ProjectConfig) UnTarCommand ¶
func (project *ProjectConfig) UnTarCommand() []string
Click to show internal directories.
Click to hide internal directories.