controller

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiDir           = "api"
	PublicDir        = "public"
	BuildDir         = "build"
	BinaryName       = "bootstrap"
	MainFile         = "main.go"
	DeployHTTPMethod = "deploy"
	HashCharacters   = 8
)
View Source
const (
	PingTemplate     = "ping"
	ExcusesTemplate  = "excuses"
	ChatTemplate     = "chat"
	TodoTemplate     = "todo"
	G2STemplate      = "github-to-slack"
	HNAlertsTemplate = "hn-alerts"
	SignupTemplate   = "signup"
	AtlasTemplate    = "mongo-atlas"
	S3UploadTemplate = "presigned-s3-upload"
	NgsChatTemplate  = "ngs-chat"
)
View Source
const (
	DefaultTemplate = PingTemplate
	LicenseFile     = "LICENSE"
	ReadmeFile      = "README.md"
	ImagesDir       = "images"
)
View Source
const (
	UserAddHTTPMethod    = "node/addUser"
	UserRemoveHTTPMethod = "node/removeUser"
	LoginHTTPMethod      = "auth/login"
)
View Source
const (
	APIGatewayLogsRole = "APIGatewayPushToCloudWatchLogsRole"
)
View Source
const DestroyHTTPMethod = "destroy"

Variables

View Source
var (
	FunctionsPath = filepath.Join(BuildDir, "functions")
)
View Source
var TemplateRepos = map[string]string{
	PingTemplate:     "https://github.com/mantil-io/template-ping",
	ExcusesTemplate:  "https://github.com/mantil-io/template-excuses",
	ChatTemplate:     "https://github.com/mantil-io/template-chat",
	TodoTemplate:     "https://github.com/mantil-io/template-todo",
	G2STemplate:      "https://github.com/mantil-io/template-github-to-slack",
	HNAlertsTemplate: "https://github.com/mantil-io/example-hn-alerts",
	SignupTemplate:   "https://github.com/mantil-io/example-signup",
	AtlasTemplate:    "https://github.com/mantil-io/example-mongo-atlas",
	S3UploadTemplate: "https://github.com/mantil-io/template-presigned-s3-upload",
	NgsChatTemplate:  "https://github.com/mantil-io/example-ngs-chat",
}

Functions

func AuthToken added in v0.2.9

func AuthToken(n *domain.Node) (string, error)

func DefaultNodeName

func DefaultNodeName() string

func Defer

func Defer()

run package defers

func Env

func Env(a EnvArgs) (string, error)

func GenerateApi

func GenerateApi(a GenerateApiArgs) error

func Invoke

func Invoke(a InvokeArgs) error

func Logs

func Logs(a LogsArgs) error

func New

func New(a NewArgs) error

func NewDeploy

func NewDeploy(a DeployArgs) error

func NodeLogin added in v0.2.11

func NodeLogin(a NodeLoginArgs) error

func NodeLogout added in v0.2.11

func NodeLogout(a NodeLogoutArgs) error

func NodeUserAdd added in v0.2.11

func NodeUserAdd(a NodeUserAddArgs) error

func NodeUserRemove added in v0.2.11

func NodeUserRemove(a NodeUserRemoveArgs) error

func Nodes

func Nodes() error

func Report

func Report(days int) error

func ShowTable

func ShowTable(header []string, data [][]string)

func Test

func Test(a TestArgs) error

func Watch

func Watch(a WatchArgs) error

Types

type ApiNewError

type ApiNewError struct {
	Api string
}

func (ApiNewError) Error

func (e ApiNewError) Error() string

type ArgumentError

type ArgumentError struct {
	// contains filtered or unexported fields
}

func NewArgumentError

func NewArgumentError(format string, v ...interface{}) *ArgumentError

func (*ArgumentError) Error

func (a *ArgumentError) Error() string

type AwsResources

type AwsResources struct {
	// contains filtered or unexported fields
}

func NewAwsResources

func NewAwsResources(a AwsResourcesArgs) *AwsResources

func (*AwsResources) Show

func (a *AwsResources) Show() error

type AwsResourcesArgs

type AwsResourcesArgs struct {
	Nodes bool
	Stage string
}

type ConfirmRequest

type ConfirmRequest struct {
	ReportID string `json:"reportId"`
}

type Deploy

type Deploy struct {
	// contains filtered or unexported fields
}

func NewDeployWithStage

func NewDeployWithStage(fs *domain.FileStore, stage *domain.Stage) (*Deploy, error)

func (*Deploy) Deploy

func (d *Deploy) Deploy() error

func (*Deploy) DeployWithTitle

func (d *Deploy) DeployWithTitle(title string) error

func (*Deploy) HasUpdates

func (d *Deploy) HasUpdates() bool

type DeployArgs

type DeployArgs struct {
	Stage string
}

type EnvArgs

type EnvArgs struct {
	Url   bool
	Stage string
}

type GenerateApiArgs

type GenerateApiArgs struct {
	Name    string
	Methods []string
}

type InvokeArgs

type InvokeArgs struct {
	Path           string
	Data           string
	IncludeHeaders bool
	ExcludeLogs    bool
	Stage          string
}

type LogsArgs

type LogsArgs struct {
	Function string
	Filter   string
	Stage    string
	Tail     bool
	Since    time.Duration
}

type LogsCmd

type LogsCmd struct {
	// contains filtered or unexported fields
}

type NewArgs

type NewArgs struct {
	Name       string
	From       string
	ModuleName string
}

type NodeLoginArgs added in v0.2.11

type NodeLoginArgs struct {
	NodeURL string
}

type NodeLogoutArgs added in v0.2.11

type NodeLogoutArgs struct {
	NodeName string
}

type NodeUserAddArgs added in v0.2.11

type NodeUserAddArgs struct {
	Node       string
	GithubUser string
	Role       string
}

type NodeUserRemoveArgs added in v0.2.11

type NodeUserRemoveArgs struct {
	Node     string
	Username string
}

type Setup

type Setup struct {
	// contains filtered or unexported fields
}

func NewSetup

func NewSetup(a *SetupArgs) (*Setup, error)

func (*Setup) Create

func (c *Setup) Create(version string, getPath func(string) (string, string)) error

func (*Setup) Destroy

func (c *Setup) Destroy() (bool, error)

func (*Setup) Upgrade

func (c *Setup) Upgrade(version string, getPath func(string) (string, string)) error

type SetupArgs

type SetupArgs struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	Region          string
	Profile         string
	UseEnv          bool
	NodeName        string
	DryRun          bool
	AccountID       string

	Force      bool
	Yes        bool
	GithubUser string
	// contains filtered or unexported fields
}

func (*SetupArgs) ParseArgs

func (a *SetupArgs) ParseArgs(args []string)

type Stage

type Stage struct {
	StageArgs
	// contains filtered or unexported fields
}

func NewStage

func NewStage(a StageArgs) (*Stage, error)

func (*Stage) Destroy

func (s *Stage) Destroy() error

func (*Stage) List

func (s *Stage) List() error

func (*Stage) New

func (s *Stage) New() (bool, error)

func (*Stage) Use

func (s *Stage) Use() error

type StageArgs

type StageArgs struct {
	Node       string
	Stage      string
	Yes        bool
	DestroyAll bool
}

type TestArgs

type TestArgs struct {
	RunRegexp string
	Stage     string
}

type UploadURLRequest

type UploadURLRequest struct {
	WorkspaceID string `json:"workspaceId"`
	Message     string `json:"message"`
}

type UploadURLResponse

type UploadURLResponse struct {
	ReportID string `json:"reportId"`
	URL      string `json:"url"`
}

type WatchArgs

type WatchArgs struct {
	Method string
	Data   string
	Stage  string
	Test   bool
}

Directories

Path Synopsis
Package invoke provides functions for invoking lambda functions.
Package invoke provides functions for invoking lambda functions.

Jump to

Keyboard shortcuts

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