Documentation
¶
Index ¶
- func SetManifestEnvTeamVars(manifestEnv map[string]string, appTeamDomain string, isDev bool) map[string]string
- func UpdateDefaultProjectFiles(fs afero.Fs, dirPath string, appDirName string) error
- type AppClient
- func (ac *AppClient) CleanUp()
- func (ac *AppClient) GetDeployed(ctx context.Context, teamID string) (types.App, error)
- func (ac *AppClient) GetDeployedAll(ctx context.Context) ([]types.App, string, error)
- func (ac *AppClient) GetLocal(ctx context.Context, teamID string) (types.App, error)
- func (ac *AppClient) GetLocalAll(ctx context.Context) ([]types.App, error)
- func (ac *AppClient) NewDeployed(ctx context.Context, teamID string) (types.App, error)
- func (ac *AppClient) Remove(ctx context.Context, app types.App) (types.App, error)
- func (ac *AppClient) RemoveDeployed(ctx context.Context, teamID string) (types.App, error)
- func (ac *AppClient) RemoveLocal(ctx context.Context, teamID string) (types.App, error)
- func (ac *AppClient) SaveDeployed(ctx context.Context, app types.App) error
- func (ac *AppClient) SaveLocal(ctx context.Context, app types.App) error
- type AppClientInterface
- type AppClientMock
- func (m *AppClientMock) CleanUp()
- func (m *AppClientMock) GetDeployed(ctx context.Context, teamID string) (types.App, error)
- func (m *AppClientMock) GetDeployedAll(ctx context.Context) ([]types.App, string, error)
- func (m *AppClientMock) GetLocal(ctx context.Context, teamID string) (types.App, error)
- func (m *AppClientMock) GetLocalAll(ctx context.Context) ([]types.App, error)
- func (m *AppClientMock) NewDeployed(ctx context.Context, teamID string) (types.App, error)
- func (m *AppClientMock) Remove(ctx context.Context, app types.App) (types.App, error)
- func (m *AppClientMock) RemoveDeployed(ctx context.Context, teamID string) (types.App, error)
- func (m *AppClientMock) RemoveLocal(ctx context.Context, userID string) (types.App, error)
- func (m *AppClientMock) SaveDeployed(ctx context.Context, app types.App) error
- func (m *AppClientMock) SaveLocal(ctx context.Context, app types.App) error
- type Client
- type ManifestClient
- type ManifestClientInterface
- type ManifestMockObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient reflects the states of the project's apps files and keeps track of all deployed and dev apps
func NewAppClient ¶
NewAppClient returns a new, empty instance of the AppClient TODO(@mbrooks) - Should this constructor read the file (looks like all public funcs always read first)?
func (*AppClient) CleanUp ¶
func (ac *AppClient) CleanUp()
CleanUp will first read the contents of apps*.json files and if empty, it would delete these files. It will also go ahead to delete the .slack folder if it is also empty.
func (*AppClient) GetDeployed ¶
GetDeployed returns a deployed App by its team ID
IMPORTANT: Pass an explicit teamID in all cases! Legacy behavior will rely on a default team domain used to mark a current app, but it is not a safe action.
func (*AppClient) GetDeployedAll ¶
GetDeployedAll returns all deployed apps (does not include dev apps)
func (*AppClient) GetLocalAll ¶
GetLocalAll returns all local apps
func (*AppClient) NewDeployed ¶
NewDeployed returns a new App named for the provided teamID
func (*AppClient) RemoveDeployed ¶
RemoveDeployed removes the app with teamID from the apps.json file
func (*AppClient) RemoveLocal ¶
RemoveLocal removes the app with the provided teamID from apps.dev.json
func (*AppClient) SaveDeployed ¶
SaveDeployed saves the provided app to the deployed apps file
type AppClientInterface ¶
type AppClientInterface interface {
NewDeployed(ctx context.Context, teamID string) (types.App, error)
GetDeployed(ctx context.Context, teamID string) (types.App, error)
GetDeployedAll(ctx context.Context) ([]types.App, string, error)
GetLocal(ctx context.Context, teamID string) (types.App, error)
GetLocalAll(ctx context.Context) ([]types.App, error)
RemoveDeployed(ctx context.Context, teamID string) (types.App, error)
RemoveLocal(ctx context.Context, teamID string) (types.App, error)
SaveDeployed(ctx context.Context, app types.App) error
SaveLocal(ctx context.Context, app types.App) error
Remove(ctx context.Context, app types.App) (types.App, error)
CleanUp()
}
type AppClientMock ¶
func (*AppClientMock) CleanUp ¶
func (m *AppClientMock) CleanUp()
func (*AppClientMock) GetDeployed ¶
func (*AppClientMock) GetDeployedAll ¶
func (*AppClientMock) GetLocalAll ¶
func (*AppClientMock) NewDeployed ¶
func (*AppClientMock) RemoveDeployed ¶
func (*AppClientMock) RemoveLocal ¶
func (*AppClientMock) SaveDeployed ¶
type Client ¶
type Client struct {
Manifest ManifestClientInterface
AppClientInterface
}
Client to access the app/project
type ManifestClient ¶
ManifestClient can manage the state of the project's app manifest file
func NewManifestClient ¶
func NewManifestClient( apiClient api.APIInterface, config *config.Config, ) *ManifestClient
NewManifestClient returns a new, empty instance of the ManifestClient
func (*ManifestClient) GetManifestLocal ¶
func (c *ManifestClient) GetManifestLocal(ctx context.Context, sdkConfig hooks.SDKCLIConfig, hookExecutor hooks.HookExecutor) (types.SlackYaml, error)
GetManifestLocal gathers manifest content from the "get-manifest" hook
func (*ManifestClient) GetManifestRemote ¶
func (c *ManifestClient) GetManifestRemote(ctx context.Context, token string, appID string) (types.SlackYaml, error)
GetManifestRemote retrieves the current app manifest from app settings
type ManifestClientInterface ¶
type ManifestMockObject ¶
func (*ManifestMockObject) GetManifestLocal ¶
func (m *ManifestMockObject) GetManifestLocal(ctx context.Context, sdkConfig hooks.SDKCLIConfig, hookExecutor hooks.HookExecutor) (types.SlackYaml, error)