api

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func Default

func Default() *APIClient

func (*APIClient) Actions added in v0.2.2

func (impl *APIClient) Actions(ctx context.Context, token *server.Token, uid string) (reply []string, err error)

Actions available for the app

func (*APIClient) AllTemplates

func (impl *APIClient) AllTemplates(ctx context.Context, token *server.Token) (reply []*server.TemplateStatus, err error)

Get all templates without filtering

func (*APIClient) Apply

func (impl *APIClient) Apply(ctx context.Context, token *server.Token, config application.ProjectConfig) (reply bool, err error)

Apply new configuration and save it

func (*APIClient) ChangePassword

func (impl *APIClient) ChangePassword(ctx context.Context, token *server.Token, password string) (reply bool, err error)

Change password for the user

func (*APIClient) Config

func (impl *APIClient) Config(ctx context.Context, token *server.Token) (reply *application.ProjectConfig, err error)

Project configuration

func (*APIClient) Create

func (impl *APIClient) Create(ctx context.Context, token *server.Token) (reply *application.App, err error)

Create new app (lambda)

func (*APIClient) CreateFile

func (impl *APIClient) CreateFile(ctx context.Context, token *server.Token, uid string, path string, dir bool) (reply bool, err error)

Create file or directory inside app

func (*APIClient) CreateFromTemplate

func (impl *APIClient) CreateFromTemplate(ctx context.Context, token *server.Token, templateName string) (reply *application.App, err error)

Create new app/lambda/function using pre-defined template

func (*APIClient) Download

func (impl *APIClient) Download(ctx context.Context, token *server.Token, uid string) (reply []byte, err error)

Download content as .tar.gz archive from app

func (*APIClient) Files

func (impl *APIClient) Files(ctx context.Context, token *server.Token, name string, dir string) (reply []*server.File, err error)

Files in func dir

func (*APIClient) GlobalStats

func (impl *APIClient) GlobalStats(ctx context.Context, token *server.Token, limit int) (reply []stats.Record, err error)

Global last records

func (*APIClient) Info

func (impl *APIClient) Info(ctx context.Context, token *server.Token, uid string) (reply *application.App, err error)

Info about application

func (*APIClient) Invoke added in v0.2.2

func (impl *APIClient) Invoke(ctx context.Context, token *server.Token, uid string, action string) (reply string, err error)

Invoke action in the app (if make installed)

func (impl *APIClient) Link(ctx context.Context, token *server.Token, uid string, alias string) (reply *application.App, err error)

Make link/alias for app

func (*APIClient) List

func (impl *APIClient) List(ctx context.Context, token *server.Token) (reply []*application.App, err error)

List available apps (lambdas) in a project

func (*APIClient) Login

func (impl *APIClient) Login(ctx context.Context, login string, password string) (reply *server.Token, err error)

Login user by username and password. Returns signed JWT

func (*APIClient) Pull

func (impl *APIClient) Pull(ctx context.Context, token *server.Token, uid string, file string) (reply []byte, err error)

Pull single file from app

func (*APIClient) Push

func (impl *APIClient) Push(ctx context.Context, token *server.Token, uid string, file string, content []byte) (reply bool, err error)

Push single file to app

func (*APIClient) Remove

func (impl *APIClient) Remove(ctx context.Context, token *server.Token, uid string) (reply bool, err error)

Remove app and call Uninstall handler (if defined)

func (*APIClient) RemoveFile

func (impl *APIClient) RemoveFile(ctx context.Context, token *server.Token, uid string, path string) (reply bool, err error)

Remove file or directory

func (*APIClient) RenameFile

func (impl *APIClient) RenameFile(ctx context.Context, token *server.Token, uid string, oldPath string, newPath string) (reply bool, err error)

Rename file or directory

func (*APIClient) Stats

func (impl *APIClient) Stats(ctx context.Context, token *server.Token, uid string, limit int) (reply []stats.Record, err error)

Stats for the app

func (*APIClient) Templates

func (impl *APIClient) Templates(ctx context.Context, token *server.Token) (reply []*server.Template, err error)

Templates with filter by availability including embedded

func (impl *APIClient) Unlink(ctx context.Context, token *server.Token, alias string) (reply *application.App, err error)

Remove link

func (*APIClient) Update

func (impl *APIClient) Update(ctx context.Context, token *server.Token, uid string, manifest types.Manifest) (reply *application.App, err error)

Update application manifest

func (*APIClient) Upload

func (impl *APIClient) Upload(ctx context.Context, token *server.Token, uid string, tarGz []byte) (reply bool, err error)

Upload content from .tar.gz archive to app and call Install handler (if defined)

Jump to

Keyboard shortcuts

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