Documentation
¶
Index ¶
- Variables
- func NewHTTPClient(opts HTTPClientOptions) *http.Client
- type APIInterface
- type APIMock
- func (m *APIMock) Activity(ctx context.Context, token string, activityRequest types.ActivityRequest) (ActivityResult, error)
- func (m *APIMock) AddCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
- func (m *APIMock) AddDefaultMocks()
- func (m *APIMock) AddVariable(ctx context.Context, token, appID, name, value string) error
- func (m *APIMock) AppsAuthExternalClientSecretAdd(ctx context.Context, token, appID, providerKey, clientSecret string) error
- func (m *APIMock) AppsAuthExternalDelete(ctx context.Context, token, appID, providerKey string, externalTokenID string) error
- func (m *APIMock) AppsAuthExternalList(ctx context.Context, token, appID string, includeWorkflows bool) (types.ExternalAuthorizationInfoLists, error)
- func (m *APIMock) AppsAuthExternalSelectAuth(ctx context.Context, ...) error
- func (m *APIMock) AppsAuthExternalStart(ctx context.Context, token, appID, providerKey string) (string, error)
- func (m *APIMock) AppsDatastoreBulkDelete(ctx context.Context, token string, request types.AppDatastoreBulkDelete) (types.AppDatastoreBulkDeleteResult, error)
- func (m *APIMock) AppsDatastoreBulkGet(ctx context.Context, token string, request types.AppDatastoreBulkGet) (types.AppDatastoreBulkGetResult, error)
- func (m *APIMock) AppsDatastoreBulkPut(ctx context.Context, token string, request types.AppDatastoreBulkPut) (types.AppDatastoreBulkPutResult, error)
- func (m *APIMock) AppsDatastoreCount(ctx context.Context, token string, query types.AppDatastoreCount) (types.AppDatastoreCountResult, error)
- func (m *APIMock) AppsDatastoreDelete(ctx context.Context, token string, request types.AppDatastoreDelete) (types.AppDatastoreDeleteResult, error)
- func (m *APIMock) AppsDatastoreGet(ctx context.Context, token string, request types.AppDatastoreGet) (types.AppDatastoreGetResult, error)
- func (m *APIMock) AppsDatastorePut(ctx context.Context, token string, request types.AppDatastorePut) (types.AppDatastorePutResult, error)
- func (m *APIMock) AppsDatastoreQuery(ctx context.Context, token string, query types.AppDatastoreQuery) (types.AppDatastoreQueryResult, error)
- func (m *APIMock) AppsDatastoreUpdate(ctx context.Context, token string, request types.AppDatastoreUpdate) (types.AppDatastoreUpdateResult, error)
- func (m *APIMock) AuthTeamsList(ctx context.Context, token string, limit int) ([]types.TeamInfo, string, error)
- func (m *APIMock) CertifiedAppInstall(ctx context.Context, token string, certifiedAppID string) (CertifiedInstallResult, error)
- func (m *APIMock) ChannelsInfo(ctx context.Context, token, channelID string) (*types.ChannelInfo, error)
- func (m *APIMock) ConnectionsOpen(ctx context.Context, token string) (AppsConnectionsOpenResult, error)
- func (m *APIMock) CreateApp(ctx context.Context, token string, manifest types.AppManifest, ...) (CreateAppResult, error)
- func (m *APIMock) DeleteApp(ctx context.Context, token string, appID string) error
- func (m *APIMock) DeveloperAppInstall(ctx context.Context, IO iostreams.IOStreamer, token string, app types.App, ...) (DeveloperAppInstallResult, types.InstallState, error)
- func (m *APIMock) ExchangeAuthTicket(ctx context.Context, ticket string, challenge string, cliVersion string) (ExchangeAuthTicketResult, error)
- func (m *APIMock) ExportAppManifest(ctx context.Context, token string, appID string) (ExportAppResult, error)
- func (m *APIMock) FunctionDistributionAddUsers(ctx context.Context, callbackID, appID, users string) error
- func (m *APIMock) FunctionDistributionList(ctx context.Context, callbackID, appID string) (types.Permission, []types.FunctionDistributionUser, error)
- func (m *APIMock) FunctionDistributionRemoveUsers(ctx context.Context, callbackID, appID, users string) error
- func (m *APIMock) FunctionDistributionSet(ctx context.Context, callbackID, appID string, ...) ([]types.FunctionDistributionUser, error)
- func (m *APIMock) GenerateAuthTicket(ctx context.Context, cliVersion string, serviceTokenFlag bool) (GenerateAuthTicketResult, error)
- func (m *APIMock) GetAppStatus(ctx context.Context, token string, appIDs []string, teamID string) (GetAppStatusResult, error)
- func (m *APIMock) GetPresignedS3PostParams(ctx context.Context, token string, appID string) (GenerateS3PresignedPostResult, error)
- func (m *APIMock) Host() string
- func (m *APIMock) Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error)
- func (m *APIMock) ListCollaborators(ctx context.Context, token, appID string) ([]types.SlackUser, error)
- func (m *APIMock) ListVariables(ctx context.Context, token, appID string) ([]string, error)
- func (m *APIMock) RemoveCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) (slackerror.Warnings, error)
- func (m *APIMock) RemoveVariable(ctx context.Context, token string, appID string, variableName string) error
- func (m *APIMock) RequestAppApproval(ctx context.Context, token string, appID string, teamID string, reason string, ...) (AppsApprovalsRequestsCreateResult, error)
- func (m *APIMock) RevokeToken(ctx context.Context, token string) error
- func (m *APIMock) RotateToken(ctx context.Context, auth types.SlackAuth) (RotateTokenResult, error)
- func (m *APIMock) SetHost(host string)
- func (m *APIMock) StepsList(ctx context.Context, token string, workflow string, appID string) ([]StepVersion, error)
- func (m *APIMock) StepsResponsesExport(ctx context.Context, token string, workflow string, appID string, ...) error
- func (m *APIMock) TeamsInfo(ctx context.Context, token, teamID string) (*types.TeamInfo, error)
- func (m *APIMock) TriggerPermissionsAddEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
- func (m *APIMock) TriggerPermissionsList(ctx context.Context, token, triggerID string) (types.Permission, []string, error)
- func (m *APIMock) TriggerPermissionsRemoveEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
- func (m *APIMock) TriggerPermissionsSet(ctx context.Context, token, triggerID, entities string, ...) ([]string, error)
- func (m *APIMock) UninstallApp(ctx context.Context, token string, appID, teamID string) error
- func (m *APIMock) UpdateApp(ctx context.Context, token string, appID string, manifest types.AppManifest, ...) (UpdateAppResult, error)
- func (m *APIMock) UpdateCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
- func (m *APIMock) UploadApp(ctx context.Context, token, runtime, appID string, fileName string) error
- func (m *APIMock) UploadPackageToS3(ctx context.Context, fs afero.Fs, appID string, ...) (string, error)
- func (m *APIMock) UsersInfo(ctx context.Context, token, userID string) (*types.UserInfo, error)
- func (m *APIMock) ValidateAppManifest(ctx context.Context, token string, manifest types.AppManifest, appID string) (ValidateAppManifestResult, error)
- func (m *APIMock) ValidateSession(ctx context.Context, token string) (AuthSession, error)
- func (m *APIMock) WorkflowsTriggersCreate(ctx context.Context, token string, createRequest TriggerRequest) (types.DeployedTrigger, error)
- func (m *APIMock) WorkflowsTriggersDelete(ctx context.Context, token string, triggerID string) error
- func (m *APIMock) WorkflowsTriggersInfo(ctx context.Context, token string, triggerID string) (types.DeployedTrigger, error)
- func (m *APIMock) WorkflowsTriggersList(ctx context.Context, token string, listArgs TriggerListRequest) ([]types.DeployedTrigger, string, error)
- func (m *APIMock) WorkflowsTriggersUpdate(ctx context.Context, token string, updateRequest TriggerUpdateRequest) (types.DeployedTrigger, error)
- type Activity
- type ActivityClient
- type ActivityResult
- type AppStatusResultAppInfo
- type AppsApprovalsRequestsCreateResult
- type AppsClient
- type AppsConnectionsOpenResult
- type AuthClient
- type AuthSession
- type AuthTeamsListResponse
- type CertifiedInstallResult
- type ChannelClient
- type ChannelInfoResponse
- type Client
- func (c *Client) Activity(ctx context.Context, token string, activityRequest types.ActivityRequest) (ActivityResult, error)
- func (c *Client) AddCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
- func (c *Client) AddVariable(ctx context.Context, token, appID, name, value string) error
- func (c *Client) AppsAuthExternalClientSecretAdd(ctx context.Context, token, appID, providerKey string, clientSecret string) error
- func (c *Client) AppsAuthExternalDelete(ctx context.Context, token, appID, providerKey string, externalTokenID string) error
- func (c *Client) AppsAuthExternalList(ctx context.Context, token, appID string, includeWorkflows bool) (types.ExternalAuthorizationInfoLists, error)
- func (c *Client) AppsAuthExternalSelectAuth(ctx context.Context, ...) error
- func (c *Client) AppsAuthExternalStart(ctx context.Context, token, appID, providerKey string) (string, error)
- func (c *Client) AppsDatastoreBulkDelete(ctx context.Context, token string, request types.AppDatastoreBulkDelete) (types.AppDatastoreBulkDeleteResult, error)
- func (c *Client) AppsDatastoreBulkGet(ctx context.Context, token string, request types.AppDatastoreBulkGet) (types.AppDatastoreBulkGetResult, error)
- func (c *Client) AppsDatastoreBulkPut(ctx context.Context, token string, request types.AppDatastoreBulkPut) (types.AppDatastoreBulkPutResult, error)
- func (c *Client) AppsDatastoreCount(ctx context.Context, token string, count types.AppDatastoreCount) (types.AppDatastoreCountResult, error)
- func (c *Client) AppsDatastoreDelete(ctx context.Context, token string, request types.AppDatastoreDelete) (types.AppDatastoreDeleteResult, error)
- func (c *Client) AppsDatastoreGet(ctx context.Context, token string, request types.AppDatastoreGet) (types.AppDatastoreGetResult, error)
- func (c *Client) AppsDatastorePut(ctx context.Context, token string, request types.AppDatastorePut) (types.AppDatastorePutResult, error)
- func (c *Client) AppsDatastoreQuery(ctx context.Context, token string, query types.AppDatastoreQuery) (types.AppDatastoreQueryResult, error)
- func (c *Client) AppsDatastoreUpdate(ctx context.Context, token string, request types.AppDatastoreUpdate) (types.AppDatastoreUpdateResult, error)
- func (c *Client) AuthTeamsList(ctx context.Context, token string, limit int) ([]types.TeamInfo, string, error)
- func (c *Client) CertifiedAppInstall(ctx context.Context, token string, certifiedAppID string) (CertifiedInstallResult, error)
- func (c *Client) ChannelsInfo(ctx context.Context, token, channelID string) (*types.ChannelInfo, error)
- func (c *Client) ConnectionsOpen(ctx context.Context, token string) (AppsConnectionsOpenResult, error)
- func (c *Client) CreateApp(ctx context.Context, token string, manifest types.AppManifest, ...) (CreateAppResult, error)
- func (c *Client) DeleteApp(ctx context.Context, token string, appID string) error
- func (c *Client) DeveloperAppInstall(ctx context.Context, IO iostreams.IOStreamer, token string, app types.App, ...) (DeveloperAppInstallResult, types.InstallState, error)
- func (c *Client) DoWithRetry(ctx context.Context, request *http.Request, span opentracing.Span, ...) ([]byte, error)
- func (c *Client) ExchangeAuthTicket(ctx context.Context, ticket string, challenge string, cliVersion string) (ExchangeAuthTicketResult, error)
- func (c *Client) ExportAppManifest(ctx context.Context, token, appID string) (ExportAppResult, error)
- func (c *Client) FunctionDistributionAddUsers(ctx context.Context, callbackID, appID, users string) error
- func (c *Client) FunctionDistributionList(ctx context.Context, callbackID, appID string) (types.Permission, []types.FunctionDistributionUser, error)
- func (c *Client) FunctionDistributionRemoveUsers(ctx context.Context, callbackID, appID, users string) error
- func (c *Client) FunctionDistributionSet(ctx context.Context, callbackID, appID string, ...) ([]types.FunctionDistributionUser, error)
- func (c *Client) GenerateAuthTicket(ctx context.Context, cliVersion string, serviceTokenFlag bool) (GenerateAuthTicketResult, error)
- func (c *Client) GetAppStatus(ctx context.Context, token string, appIDs []string, teamID string) (GetAppStatusResult, error)
- func (c *Client) GetPresignedS3PostParams(ctx context.Context, token string, appID string) (GenerateS3PresignedPostResult, error)
- func (c *Client) Host() string
- func (c *Client) Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error)
- func (c *Client) ListCollaborators(ctx context.Context, token, appID string) ([]types.SlackUser, error)
- func (c *Client) ListVariables(ctx context.Context, token, appID string) ([]string, error)
- func (c *Client) RemoveCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) (slackerror.Warnings, error)
- func (c *Client) RemoveVariable(ctx context.Context, token string, appID string, variableName string) error
- func (c *Client) RequestAppApproval(ctx context.Context, token string, appID string, teamID string, reason string, ...) (AppsApprovalsRequestsCreateResult, error)
- func (c *Client) RevokeToken(ctx context.Context, token string) error
- func (c *Client) RotateToken(ctx context.Context, auth types.SlackAuth) (RotateTokenResult, error)
- func (c *Client) SetHost(host string)
- func (c *Client) StepsList(ctx context.Context, token string, workflow string, appID string) ([]StepVersion, error)
- func (c *Client) StepsResponsesExport(ctx context.Context, token string, workflow string, appID string, ...) error
- func (c *Client) TeamsInfo(ctx context.Context, token, teamID string) (*types.TeamInfo, error)
- func (c *Client) TriggerPermissionsAddEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
- func (c *Client) TriggerPermissionsList(ctx context.Context, token, triggerID string) (types.Permission, []string, error)
- func (c *Client) TriggerPermissionsRemoveEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
- func (c *Client) TriggerPermissionsSet(ctx context.Context, token, triggerID, entities string, ...) ([]string, error)
- func (c *Client) UninstallApp(ctx context.Context, token string, appID, teamID string) error
- func (c *Client) UpdateApp(ctx context.Context, token string, appID string, manifest types.AppManifest, ...) (UpdateAppResult, error)
- func (c *Client) UpdateCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
- func (c *Client) UploadApp(ctx context.Context, token, runtime, appID string, fileName string) error
- func (c *Client) UploadPackageToS3(ctx context.Context, fs afero.Fs, appID string, ...) (string, error)
- func (c *Client) UsersInfo(ctx context.Context, token, userID string) (*types.UserInfo, error)
- func (c *Client) ValidateAppManifest(ctx context.Context, token string, manifest types.AppManifest, appID string) (ValidateAppManifestResult, error)
- func (c *Client) ValidateSession(ctx context.Context, token string) (AuthSession, error)
- func (c *Client) WorkflowsTriggersCreate(ctx context.Context, token string, trigger TriggerRequest) (types.DeployedTrigger, error)
- func (c *Client) WorkflowsTriggersDelete(ctx context.Context, token string, triggerID string) error
- func (c *Client) WorkflowsTriggersInfo(ctx context.Context, token, triggerID string) (types.DeployedTrigger, error)
- func (c *Client) WorkflowsTriggersList(ctx context.Context, token string, listArgs TriggerListRequest) ([]types.DeployedTrigger, string, error)
- func (c *Client) WorkflowsTriggersUpdate(ctx context.Context, token string, trigger TriggerUpdateRequest) (types.DeployedTrigger, error)
- type CollaboratorsClient
- type CreateAppResult
- type Credentials
- type DatastoresClient
- type DeveloperAppInstallResult
- type ExchangeAuthTicketResult
- type ExportAppResponse
- type ExportAppResult
- type ExternalAuthClient
- type FakeClientParams
- type FunctionDistributionAddUsersResponse
- type FunctionDistributionClient
- type FunctionDistributionListResponse
- type FunctionDistributionRemoveUsersResponse
- type FunctionDistributionSetResponse
- type GenerateAuthTicketResult
- type GenerateS3PresignedPostResult
- type GetAppStatusResponse
- type GetAppStatusResult
- type HTTPClientOptions
- type IconResult
- type Input
- type Inputs
- type MissingParameterDetail
- type PresignedPostFields
- type RotateTokenResult
- type SessionsClient
- type Shortcut
- type StepVersion
- type StepsClient
- type TeamClient
- type TeamInfoResponse
- type TriggerAccessClient
- type TriggerCreateOrUpdateError
- type TriggerListRequest
- type TriggerPermissionsAddEntitiesResponse
- type TriggerPermissionsListResponse
- type TriggerPermissionsRemoveEntitiesResponse
- type TriggerPermissionsSetResponse
- type TriggerRequest
- type TriggerUpdateRequest
- type UpdateAppResult
- type UploadAppArgs
- type UserClient
- type UserInfoResponse
- type ValidateAppManifestResult
- type VariablesClient
- type WorkflowsClient
Constants ¶
This section is empty.
Variables ¶
var DefaultAuthTeamsListPageSize = 100
Default value for the maximum number of workspaces to return
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(opts HTTPClientOptions) *http.Client
New returns an http.Client based on a given Options input.
Types ¶
type APIInterface ¶
type APIInterface interface {
ActivityClient
AppsClient
AuthClient
ChannelClient
CollaboratorsClient
DatastoresClient
ExternalAuthClient
FunctionDistributionClient
SessionsClient
StepsClient
TeamClient
TriggerAccessClient
UserClient
VariablesClient
WorkflowsClient
}
Interface that embeds all of the sub-interfaces for each file in this package. api.Client implements this interface, so it can be mocked out easily. TODO: consider renaming interfaces from '*Client' to an -er verb such as '*Manager'
Ref: https://go.dev/doc/effective_go#interface-names
type APIMock ¶
func (*APIMock) Activity ¶
func (m *APIMock) Activity(ctx context.Context, token string, activityRequest types.ActivityRequest) (ActivityResult, error)
func (*APIMock) AddCollaborator ¶
func (*APIMock) AddDefaultMocks ¶
func (m *APIMock) AddDefaultMocks()
func (*APIMock) AddVariable ¶
func (*APIMock) AppsAuthExternalClientSecretAdd ¶
func (*APIMock) AppsAuthExternalDelete ¶
func (*APIMock) AppsAuthExternalList ¶
func (*APIMock) AppsAuthExternalSelectAuth ¶
func (*APIMock) AppsAuthExternalStart ¶
func (*APIMock) AppsDatastoreBulkDelete ¶
func (m *APIMock) AppsDatastoreBulkDelete(ctx context.Context, token string, request types.AppDatastoreBulkDelete) (types.AppDatastoreBulkDeleteResult, error)
func (*APIMock) AppsDatastoreBulkGet ¶
func (m *APIMock) AppsDatastoreBulkGet(ctx context.Context, token string, request types.AppDatastoreBulkGet) (types.AppDatastoreBulkGetResult, error)
func (*APIMock) AppsDatastoreBulkPut ¶
func (m *APIMock) AppsDatastoreBulkPut(ctx context.Context, token string, request types.AppDatastoreBulkPut) (types.AppDatastoreBulkPutResult, error)
func (*APIMock) AppsDatastoreCount ¶
func (m *APIMock) AppsDatastoreCount(ctx context.Context, token string, query types.AppDatastoreCount) (types.AppDatastoreCountResult, error)
func (*APIMock) AppsDatastoreDelete ¶
func (m *APIMock) AppsDatastoreDelete(ctx context.Context, token string, request types.AppDatastoreDelete) (types.AppDatastoreDeleteResult, error)
func (*APIMock) AppsDatastoreGet ¶
func (m *APIMock) AppsDatastoreGet(ctx context.Context, token string, request types.AppDatastoreGet) (types.AppDatastoreGetResult, error)
func (*APIMock) AppsDatastorePut ¶
func (m *APIMock) AppsDatastorePut(ctx context.Context, token string, request types.AppDatastorePut) (types.AppDatastorePutResult, error)
func (*APIMock) AppsDatastoreQuery ¶
func (m *APIMock) AppsDatastoreQuery(ctx context.Context, token string, query types.AppDatastoreQuery) (types.AppDatastoreQueryResult, error)
func (*APIMock) AppsDatastoreUpdate ¶
func (m *APIMock) AppsDatastoreUpdate(ctx context.Context, token string, request types.AppDatastoreUpdate) (types.AppDatastoreUpdateResult, error)
func (*APIMock) AuthTeamsList ¶
func (*APIMock) CertifiedAppInstall ¶
func (*APIMock) ChannelsInfo ¶
func (*APIMock) ConnectionsOpen ¶
func (*APIMock) CreateApp ¶
func (m *APIMock) CreateApp(ctx context.Context, token string, manifest types.AppManifest, enableDistribution bool) (CreateAppResult, error)
func (*APIMock) DeveloperAppInstall ¶
func (*APIMock) ExchangeAuthTicket ¶
func (*APIMock) ExportAppManifest ¶
func (*APIMock) FunctionDistributionAddUsers ¶
func (*APIMock) FunctionDistributionList ¶
func (m *APIMock) FunctionDistributionList(ctx context.Context, callbackID, appID string) (types.Permission, []types.FunctionDistributionUser, error)
func (*APIMock) FunctionDistributionRemoveUsers ¶
func (*APIMock) FunctionDistributionSet ¶
func (m *APIMock) FunctionDistributionSet(ctx context.Context, callbackID, appID string, distributionType types.Permission, users string) ([]types.FunctionDistributionUser, error)
func (*APIMock) GenerateAuthTicket ¶
func (*APIMock) GetAppStatus ¶
func (*APIMock) GetPresignedS3PostParams ¶
func (*APIMock) ListCollaborators ¶
func (*APIMock) ListVariables ¶
func (*APIMock) RemoveCollaborator ¶
func (*APIMock) RemoveVariable ¶
func (*APIMock) RequestAppApproval ¶
func (*APIMock) RevokeToken ¶
func (*APIMock) RotateToken ¶
func (*APIMock) StepsResponsesExport ¶
func (*APIMock) TriggerPermissionsAddEntities ¶
func (*APIMock) TriggerPermissionsList ¶
func (*APIMock) TriggerPermissionsRemoveEntities ¶
func (*APIMock) TriggerPermissionsSet ¶
func (*APIMock) UninstallApp ¶
func (*APIMock) UpdateCollaborator ¶
func (*APIMock) UploadPackageToS3 ¶
func (*APIMock) ValidateAppManifest ¶
func (m *APIMock) ValidateAppManifest(ctx context.Context, token string, manifest types.AppManifest, appID string) (ValidateAppManifestResult, error)
func (*APIMock) ValidateSession ¶
func (*APIMock) WorkflowsTriggersCreate ¶
func (m *APIMock) WorkflowsTriggersCreate(ctx context.Context, token string, createRequest TriggerRequest) (types.DeployedTrigger, error)
func (*APIMock) WorkflowsTriggersDelete ¶
func (*APIMock) WorkflowsTriggersInfo ¶
func (*APIMock) WorkflowsTriggersList ¶
func (m *APIMock) WorkflowsTriggersList(ctx context.Context, token string, listArgs TriggerListRequest) ([]types.DeployedTrigger, string, error)
func (*APIMock) WorkflowsTriggersUpdate ¶
func (m *APIMock) WorkflowsTriggersUpdate(ctx context.Context, token string, updateRequest TriggerUpdateRequest) (types.DeployedTrigger, error)
type Activity ¶
type Activity struct {
TraceID string `json:"trace_id,omitempty"`
Level types.ActivityLevel `json:"level,omitempty"`
EventType types.EventType `json:"event_type,omitempty"`
Source string `json:"source,omitempty"`
ComponentType string `json:"component_type,omitempty"`
ComponentID string `json:"component_id,omitempty"`
Payload map[string]interface{} `json:"payload,omitempty"`
Created int64 `json:"created,omitempty"`
}
func (*Activity) CreatedPretty ¶
type ActivityClient ¶
type ActivityClient interface {
Activity(ctx context.Context, token string, activityRequest types.ActivityRequest) (ActivityResult, error)
}
type ActivityResult ¶
type AppStatusResultAppInfo ¶
type AppStatusResultAppInfo struct {
AppID string `json:"app_id"`
Installed bool `json:"is_installed"`
Hosted bool `json:"is_hosted"`
EnterpriseGrants []types.EnterpriseGrant `json:"enterprise_grants,omitempty"`
}
type AppsApprovalsRequestsCreateResult ¶
type AppsApprovalsRequestsCreateResult struct {
RequestID string `json:"request_id"`
}
type AppsClient ¶
type AppsClient interface {
CertifiedAppInstall(ctx context.Context, token string, certifiedAppID string) (CertifiedInstallResult, error)
ConnectionsOpen(ctx context.Context, token string) (AppsConnectionsOpenResult, error)
CreateApp(ctx context.Context, token string, manifest types.AppManifest, enableDistribution bool) (CreateAppResult, error)
DeleteApp(ctx context.Context, token string, appID string) error
DeveloperAppInstall(ctx context.Context, IO iostreams.IOStreamer, token string, app types.App, botScopes []string, outgoingDomains []string, orgGrantWorkspaceID string, autoRequestAAA bool) (DeveloperAppInstallResult, types.InstallState, error)
ExportAppManifest(ctx context.Context, token string, appID string) (ExportAppResult, error)
GetAppStatus(ctx context.Context, token string, appIDs []string, teamID string) (GetAppStatusResult, error)
GetPresignedS3PostParams(ctx context.Context, token string, appID string) (GenerateS3PresignedPostResult, error)
Host() string
Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error)
RequestAppApproval(ctx context.Context, token string, appID string, teamID string, reason string, scopes string, outgoingDomains []string) (AppsApprovalsRequestsCreateResult, error)
SetHost(host string)
UninstallApp(ctx context.Context, token string, appID, teamID string) error
UpdateApp(ctx context.Context, token string, appID string, manifest types.AppManifest, forceUpdate bool, continueWithBreakingChanges bool) (UpdateAppResult, error)
UploadApp(ctx context.Context, token, runtime, appID string, fileName string) error
UploadPackageToS3(ctx context.Context, fs afero.Fs, appID string, uploadParams GenerateS3PresignedPostResult, archiveFilePath string) (string, error)
ValidateAppManifest(ctx context.Context, token string, manifest types.AppManifest, appID string) (ValidateAppManifestResult, error)
}
AppsClient is the interface for app-related API calls
type AppsConnectionsOpenResult ¶
type AppsConnectionsOpenResult struct {
URL string `json:"url"`
}
GenerateS3PresignedPost details to be saved
type AuthClient ¶
type AuthClient interface {
ExchangeAuthTicket(ctx context.Context, ticket string, challenge string, cliVersion string) (ExchangeAuthTicketResult, error)
GenerateAuthTicket(ctx context.Context, cliVersion string, serviceTokenFlag bool) (GenerateAuthTicketResult, error)
RotateToken(ctx context.Context, auth types.SlackAuth) (RotateTokenResult, error)
}
type AuthSession ¶
type AuthSession struct {
UserName *string `json:"user,omitempty"`
UserID *string `json:"user_id,omitempty"`
TeamID *string `json:"team_id,omitempty"`
TeamName *string `json:"team,omitempty"`
EnterpriseID *string `json:"enterprise_id,omitempty"`
IsEnterpriseInstall *bool `json:"is_enterprise_install,omitempty"`
URL *string `json:"url,omitempty"`
}
No guaranteed properties in API response so omitempty is used
type AuthTeamsListResponse ¶
type ChannelClient ¶
type ChannelInfoResponse ¶
type ChannelInfoResponse struct {
Channel types.ChannelInfo `json:"channel"`
// contains filtered or unexported fields
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides an http connection for communicating with the Slack API.
func NewClient ¶
NewClient accepts an httpClient to facilitate making http requests to Slack. Client does not attempt to evaluate the response body, leaving that to the caller.
func NewFakeClient ¶
func NewFakeClient(t *testing.T, params FakeClientParams) (*Client, func())
NewFakeClient returns a *Client that is wired up to expect the specific request to a particular method, and if it receives it, returns a predefined response.
func (*Client) Activity ¶
func (c *Client) Activity(ctx context.Context, token string, activityRequest types.ActivityRequest) (ActivityResult, error)
Get the recent activity for an app
func (*Client) AddCollaborator ¶
func (c *Client) AddCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
AddCollaborator adds an app collaborator
func (*Client) AddVariable ¶
AddVariables adds/updates one or more environment variables
func (*Client) AppsAuthExternalClientSecretAdd ¶
func (*Client) AppsAuthExternalDelete ¶
func (*Client) AppsAuthExternalList ¶
func (*Client) AppsAuthExternalSelectAuth ¶
func (*Client) AppsAuthExternalStart ¶
func (*Client) AppsDatastoreBulkDelete ¶
func (c *Client) AppsDatastoreBulkDelete(ctx context.Context, token string, request types.AppDatastoreBulkDelete) (types.AppDatastoreBulkDeleteResult, error)
func (*Client) AppsDatastoreBulkGet ¶
func (c *Client) AppsDatastoreBulkGet(ctx context.Context, token string, request types.AppDatastoreBulkGet) (types.AppDatastoreBulkGetResult, error)
func (*Client) AppsDatastoreBulkPut ¶
func (c *Client) AppsDatastoreBulkPut(ctx context.Context, token string, request types.AppDatastoreBulkPut) (types.AppDatastoreBulkPutResult, error)
func (*Client) AppsDatastoreCount ¶
func (c *Client) AppsDatastoreCount(ctx context.Context, token string, count types.AppDatastoreCount) (types.AppDatastoreCountResult, error)
func (*Client) AppsDatastoreDelete ¶
func (c *Client) AppsDatastoreDelete(ctx context.Context, token string, request types.AppDatastoreDelete) (types.AppDatastoreDeleteResult, error)
func (*Client) AppsDatastoreGet ¶
func (c *Client) AppsDatastoreGet(ctx context.Context, token string, request types.AppDatastoreGet) (types.AppDatastoreGetResult, error)
func (*Client) AppsDatastorePut ¶
func (c *Client) AppsDatastorePut(ctx context.Context, token string, request types.AppDatastorePut) (types.AppDatastorePutResult, error)
func (*Client) AppsDatastoreQuery ¶
func (c *Client) AppsDatastoreQuery(ctx context.Context, token string, query types.AppDatastoreQuery) (types.AppDatastoreQueryResult, error)
func (*Client) AppsDatastoreUpdate ¶
func (c *Client) AppsDatastoreUpdate(ctx context.Context, token string, request types.AppDatastoreUpdate) (types.AppDatastoreUpdateResult, error)
func (*Client) AuthTeamsList ¶
func (c *Client) AuthTeamsList(ctx context.Context, token string, limit int) ([]types.TeamInfo, string, error)
AuthTeamsList returns a list of workspaces that the user has access to through the token as well as a pagination cursor if the org has more workspaces than returned in this request. Used to retrieve enterprise workspaces that belong to an org. Specify the maximum number of workspaces to return via the `limit` param (value between 1 and 1000).
func (*Client) CertifiedAppInstall ¶
func (c *Client) CertifiedAppInstall(ctx context.Context, token string, certifiedAppID string) (CertifiedInstallResult, error)
CertifiedAppInstall requests the installation of a certified app in order for its connectors to be usable
func (*Client) ChannelsInfo ¶
func (c *Client) ChannelsInfo(ctx context.Context, token, channelID string) (*types.ChannelInfo, error)
ChannelInfo returns information about the channel such as channel name
func (*Client) ConnectionsOpen ¶
func (*Client) CreateApp ¶
func (c *Client) CreateApp(ctx context.Context, token string, manifest types.AppManifest, enableDistribution bool) (CreateAppResult, error)
CreateApp creates a new Slack app
func (*Client) DeveloperAppInstall ¶
func (*Client) DoWithRetry ¶
func (c *Client) DoWithRetry(ctx context.Context, request *http.Request, span opentracing.Span, skipDebugLog bool, sURL *url.URL) ([]byte, error)
DoWithRetry will execute the request and retry failed requests if the status indicates the request may be retryable and a Retry-After header is present.
func (*Client) ExchangeAuthTicket ¶
func (c *Client) ExchangeAuthTicket(ctx context.Context, ticket string, challenge string, cliVersion string) (ExchangeAuthTicketResult, error)
ExchangeAuthTicket
func (*Client) ExportAppManifest ¶
func (c *Client) ExportAppManifest(ctx context.Context, token, appID string) (ExportAppResult, error)
ExportAppManifest calls "apps.manifest.export" to gather manifest details
func (*Client) FunctionDistributionAddUsers ¶
func (c *Client) FunctionDistributionAddUsers(ctx context.Context, callbackID, appID, users string) error
FunctionDistributionAddUsers adds the given entities to the access list for functions with distribution type 'named_entities'.
func (*Client) FunctionDistributionList ¶
func (c *Client) FunctionDistributionList(ctx context.Context, callbackID, appID string) (types.Permission, []types.FunctionDistributionUser, error)
FunctionDistributionList returns the distribution type. If type is 'named_entities', the IDs of entities that have access are also returned.
func (*Client) FunctionDistributionRemoveUsers ¶
func (c *Client) FunctionDistributionRemoveUsers(ctx context.Context, callbackID, appID, users string) error
FunctionDistributionRemoveUsers removes the given entities from the access list for functions with distribution type 'named_entities'.
func (*Client) FunctionDistributionSet ¶
func (c *Client) FunctionDistributionSet(ctx context.Context, callbackID, appID string, distributionType types.Permission, users string) ([]types.FunctionDistributionUser, error)
FunctionDistributionSet sets the distribution type for the given function. One can also pass in a list of users to assign access to if distribution type is named_entities.
func (*Client) GenerateAuthTicket ¶
func (c *Client) GenerateAuthTicket(ctx context.Context, cliVersion string, serviceTokenFlag bool) (GenerateAuthTicketResult, error)
GenerateAuthTicket
func (*Client) GetAppStatus ¶
func (c *Client) GetAppStatus(ctx context.Context, token string, appIDs []string, teamID string) (GetAppStatusResult, error)
GetAppStatus fetches information about the given apps's installation
func (*Client) GetPresignedS3PostParams ¶
func (*Client) Icon ¶
func (c *Client) Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error)
Icon updates a Slack App's icon
func (*Client) ListCollaborators ¶
func (c *Client) ListCollaborators(ctx context.Context, token, appID string) ([]types.SlackUser, error)
ListCollaborators lists app collaborators
func (*Client) ListVariables ¶
ListVariables adds/updates an environment variable
func (*Client) RemoveCollaborator ¶
func (c *Client) RemoveCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) (slackerror.Warnings, error)
RemoveCollaborator removes an app collaborator
func (*Client) RemoveVariable ¶
func (c *Client) RemoveVariable(ctx context.Context, token string, appID string, variableName string) error
RemoveVariable removes an environment variable
func (*Client) RequestAppApproval ¶
func (c *Client) RequestAppApproval(ctx context.Context, token string, appID string, teamID string, reason string, scopes string, outgoingDomains []string) (AppsApprovalsRequestsCreateResult, error)
RequestAppApproval creates a new app approval request to slack
func (*Client) RevokeToken ¶
RevokeToken sends a given token to the Slack API for revocation
func (*Client) RotateToken ¶
RotateToken calls tooling.tokens.rotate
func (*Client) StepsResponsesExport ¶
func (*Client) TriggerPermissionsAddEntities ¶
func (c *Client) TriggerPermissionsAddEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
TriggerPermissionsAddEntities adds the given entities to the access list for triggers with access type 'named_entities'.
func (*Client) TriggerPermissionsList ¶
func (c *Client) TriggerPermissionsList(ctx context.Context, token, triggerID string) (types.Permission, []string, error)
TriggerPermissionsList returns the access type. If type is 'named_entities', the IDs of entities that have access are also returned.
func (*Client) TriggerPermissionsRemoveEntities ¶
func (c *Client) TriggerPermissionsRemoveEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
TriggerPermissionsRemoveEntities removes the given entities from the access list for triggers with access type 'named_entities'.
func (*Client) TriggerPermissionsSet ¶
func (c *Client) TriggerPermissionsSet(ctx context.Context, token, triggerID, entities string, permissionType types.Permission, entityType string) ([]string, error)
TriggerPermissionsSet sets the access type for the given trigger. One can also pass in a list of entities to assign access to if access type is named_entities.
func (*Client) UninstallApp ¶
UninstallApp uninstalls a Slack app from its team
func (*Client) UpdateApp ¶
func (c *Client) UpdateApp(ctx context.Context, token string, appID string, manifest types.AppManifest, forceUpdate bool, continueWithBreakingChanges bool) (UpdateAppResult, error)
UpdateApp updates a Slack app
func (*Client) UpdateCollaborator ¶
func (c *Client) UpdateCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
UpdateCollaborator updates an app collaborator
func (*Client) UploadApp ¶
func (c *Client) UploadApp(ctx context.Context, token, runtime, appID string, fileName string) error
UploadApp takes a manifest and creates a new app
func (*Client) UploadPackageToS3 ¶
func (c *Client) UploadPackageToS3(ctx context.Context, fs afero.Fs, appID string, uploadParams GenerateS3PresignedPostResult, archiveFilePath string) (string, error)
UploadPackageToS3 uploads an archive file to S3, given the provided upload params. TODO: Should be moved out of Client, since it just reuses the httpclient instance directly
func (*Client) ValidateAppManifest ¶
func (c *Client) ValidateAppManifest(ctx context.Context, token string, manifest types.AppManifest, appID string) (ValidateAppManifestResult, error)
ValidateAppManifest validates a new Slack app
func (*Client) ValidateSession ¶
ValidateSession ensures that a given token has a valid session with the Slack API. cookie only required if token is a xoxc token otherwise "" is okay
func (*Client) WorkflowsTriggersCreate ¶
func (c *Client) WorkflowsTriggersCreate(ctx context.Context, token string, trigger TriggerRequest) (types.DeployedTrigger, error)
WorkflowsTriggersCreate will create a new trigger using the method workflows.trigger.create
func (*Client) WorkflowsTriggersDelete ¶
WorkflowsTriggersDelete will delete an existing trigger using the method workflows.trigger.delete
func (*Client) WorkflowsTriggersInfo ¶
func (c *Client) WorkflowsTriggersInfo(ctx context.Context, token, triggerID string) (types.DeployedTrigger, error)
WorkflowsTriggersInfo will retrieve information on an existing trigger
func (*Client) WorkflowsTriggersList ¶
func (c *Client) WorkflowsTriggersList(ctx context.Context, token string, listArgs TriggerListRequest) ([]types.DeployedTrigger, string, error)
WorkflowsTriggersList will list the existing triggers
func (*Client) WorkflowsTriggersUpdate ¶
func (c *Client) WorkflowsTriggersUpdate(ctx context.Context, token string, trigger TriggerUpdateRequest) (types.DeployedTrigger, error)
WorkflowsTriggersUpdate will update an existing trigger using the method workflows.trigger.update
type CollaboratorsClient ¶
type CollaboratorsClient interface {
AddCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
ListCollaborators(ctx context.Context, token, appID string) ([]types.SlackUser, error)
RemoveCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) (slackerror.Warnings, error)
UpdateCollaborator(ctx context.Context, token, appID string, slackUser types.SlackUser) error
}
type CreateAppResult ¶
type CreateAppResult struct {
AppID string `json:"app_id,omitempty"`
Credentials Credentials `json:"credentials,omitempty"`
OAuthAuthorizeURL string `json:"oauth_authorize_url,omitempty"`
}
CreateAppResult details to be saved
type Credentials ¶
type Credentials struct {
ClientID string `json:"client_id,omitempty"`
ClientSecret string `json:"client_secret,omitempty"`
VerificationToken string `json:"verification_token,omitempty"`
SigningSecret string `json:"signing_secret,omitempty"`
}
App Credentials to be saved
type DatastoresClient ¶
type DatastoresClient interface {
AppsDatastorePut(ctx context.Context, token string, request types.AppDatastorePut) (types.AppDatastorePutResult, error)
AppsDatastoreBulkPut(ctx context.Context, token string, request types.AppDatastoreBulkPut) (types.AppDatastoreBulkPutResult, error)
AppsDatastoreUpdate(ctx context.Context, token string, request types.AppDatastoreUpdate) (types.AppDatastoreUpdateResult, error)
AppsDatastoreQuery(ctx context.Context, token string, query types.AppDatastoreQuery) (types.AppDatastoreQueryResult, error)
AppsDatastoreCount(ctx context.Context, token string, query types.AppDatastoreCount) (types.AppDatastoreCountResult, error)
AppsDatastoreDelete(ctx context.Context, token string, request types.AppDatastoreDelete) (types.AppDatastoreDeleteResult, error)
AppsDatastoreBulkDelete(ctx context.Context, token string, request types.AppDatastoreBulkDelete) (types.AppDatastoreBulkDeleteResult, error)
AppsDatastoreGet(ctx context.Context, token string, request types.AppDatastoreGet) (types.AppDatastoreGetResult, error)
AppsDatastoreBulkGet(ctx context.Context, token string, request types.AppDatastoreBulkGet) (types.AppDatastoreBulkGetResult, error)
}
type DeveloperAppInstallResult ¶
type DeveloperAppInstallResult struct {
AppID string `json:"app_id,omitempty"`
APIAccessTokens struct {
Bot string `json:"bot,omitempty"`
AppLevel string `json:"app_level,omitempty"`
User string `json:"user,omitempty"`
} `json:"api_access_tokens,omitempty"`
}
Details related to successful installation
type ExchangeAuthTicketResult ¶
type ExchangeAuthTicketResult struct {
EnterpriseID string `json:"enterprise_id,omitempty"`
ExpiresAt int `json:"exp,omitempty"`
IsEnterpriseInstall bool `json:"is_enterprise_install,omitempty"`
IsReady bool `json:"is_ready,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
TeamDomain string `json:"team_domain"`
TeamID string `json:"team_id"`
TeamName string `json:"team_name"`
Token string `json:"token,omitempty"`
UserID string `json:"user_id"`
}
ExchangeAuthTicketResult details to be returned
type ExportAppResponse ¶
type ExportAppResponse struct {
ExportAppResult
// contains filtered or unexported fields
}
type ExportAppResult ¶
type ExternalAuthClient ¶
type ExternalAuthClient interface {
AppsAuthExternalStart(context.Context, string, string, string) (string, error)
AppsAuthExternalDelete(context.Context, string, string, string, string) error
AppsAuthExternalClientSecretAdd(context.Context, string, string, string, string) error
AppsAuthExternalList(context.Context, string, string, bool) (types.ExternalAuthorizationInfoLists, error)
AppsAuthExternalSelectAuth(context.Context, string, string, string, string, string) error
}
For easy mocking
type FakeClientParams ¶
type FakeClientParams struct {
// The API method we expect to call, like "apps.manifest.create"
ExpectedMethod string
// The JSON payload we send to the server. If empty, this assertion is skipped.
ExpectedRequest string
// Any querystring parameters we expect the client to append to the URL
ExpectedQuerystring string
// The response sent back from the server to the client.
Response string
// If > 0, the request terminates with this status code and no response body.
StatusCode int
}
type FunctionDistributionAddUsersResponse ¶
type FunctionDistributionAddUsersResponse struct {
// contains filtered or unexported fields
}
type FunctionDistributionClient ¶
type FunctionDistributionClient interface {
FunctionDistributionList(ctx context.Context, callbackID, appID string) (types.Permission, []types.FunctionDistributionUser, error)
FunctionDistributionSet(ctx context.Context, callbackID, appID string, distributionType types.Permission, users string) ([]types.FunctionDistributionUser, error)
FunctionDistributionAddUsers(ctx context.Context, callbackID, appID, users string) error
FunctionDistributionRemoveUsers(ctx context.Context, callbackID, appID, users string) error
}
type FunctionDistributionListResponse ¶
type FunctionDistributionListResponse struct {
DistributionType string `json:"distribution_type"`
Users []types.FunctionDistributionUser `json:"users"`
// contains filtered or unexported fields
}
type FunctionDistributionRemoveUsersResponse ¶
type FunctionDistributionRemoveUsersResponse struct {
// contains filtered or unexported fields
}
type FunctionDistributionSetResponse ¶
type FunctionDistributionSetResponse struct {
DistributionType string `json:"distribution_type"`
Users []types.FunctionDistributionUser `json:"users"`
// contains filtered or unexported fields
}
type GenerateAuthTicketResult ¶
type GenerateAuthTicketResult struct {
Ticket string `json:"ticket,omitempty"`
}
GenerateAuthTicketResult details to be returned
type GenerateS3PresignedPostResult ¶
type GenerateS3PresignedPostResult struct {
URL string `json:"url"`
FileName string `json:"file_name"`
Fields PresignedPostFields `json:"fields"`
}
GenerateS3PresignedPost details to be saved
type GetAppStatusResponse ¶
type GetAppStatusResponse struct {
GetAppStatusResult
// contains filtered or unexported fields
}
type GetAppStatusResult ¶
type GetAppStatusResult struct {
Apps []AppStatusResultAppInfo `json:"apps"`
Team struct {
TeamID string `json:"team_id"`
TeamDomain string `json:"team_domain"`
IsEnterprise bool `json:"is_enterprise"`
} `json:"team"`
}
type HTTPClientOptions ¶
type HTTPClientOptions struct {
TotalTimeOut time.Duration // total time for the life of the request.
SkipTLSVerify bool
Retries int // how many times we should retry, if 0 no retry logic is added.
Backoff *time.Duration // constant duration to wait between requests.
AttemptTimeout *time.Duration // how long we give each attempt before we cancel the request.
RetryErrorCodes []string // which slack application error codes we want to retry on.
RetryStatusCodes []int // which http status codes we want to retry on.
}
Options allows a user of this lib to customize their http Client.
type MissingParameterDetail ¶
type PresignedPostFields ¶
type PresignedPostFields struct {
AmzCredentials string `json:"X-Amz-Credential"`
AmzAlgorithm string `json:"X-Amz-Algorithm"`
AmzFileKey string `json:"key"`
AmzFileCreateDate string `json:"X-Amz-Date"`
AmzPolicy string `json:"Policy"`
AmzSignature string `json:"X-Amz-Signature"`
AmzToken string `json:"X-Amz-Security-Token"`
}
S3 presigned post response to be saved
type RotateTokenResult ¶
type SessionsClient ¶
type StepVersion ¶
type StepsClient ¶
type TeamClient ¶
type TeamInfoResponse ¶
type TriggerAccessClient ¶
type TriggerAccessClient interface {
TriggerPermissionsList(ctx context.Context, token, triggerID string) (types.Permission, []string, error)
TriggerPermissionsSet(ctx context.Context, token, triggerID, entities string, permissionType types.Permission, entityType string) ([]string, error)
TriggerPermissionsAddEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
TriggerPermissionsRemoveEntities(ctx context.Context, token, triggerID, entities string, entityType string) error
}
type TriggerCreateOrUpdateError ¶
type TriggerCreateOrUpdateError struct {
Err error
MissingParameterDetail MissingParameterDetail
}
func (*TriggerCreateOrUpdateError) Error ¶
func (e *TriggerCreateOrUpdateError) Error() string
type TriggerListRequest ¶
type TriggerPermissionsAddEntitiesResponse ¶
type TriggerPermissionsAddEntitiesResponse struct {
// contains filtered or unexported fields
}
type TriggerPermissionsRemoveEntitiesResponse ¶
type TriggerPermissionsRemoveEntitiesResponse struct {
// contains filtered or unexported fields
}
type TriggerRequest ¶
type TriggerRequest struct {
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
Shortcut *Shortcut `json:"shortcut,omitempty"`
Workflow string `json:"workflow"`
WorkflowAppID string `json:"workflow_app_id"`
Inputs Inputs `json:"inputs,omitempty"`
Event *types.RawJSON `json:"event,omitempty"`
Schedule *types.RawJSON `json:"schedule,omitempty"`
WebHook *types.RawJSON `json:"webhook,omitempty"`
Service *types.RawJSON `json:"service,omitempty"`
}
type TriggerUpdateRequest ¶
type TriggerUpdateRequest struct {
TriggerRequest
TriggerID string `json:"trigger_id"`
}
type UpdateAppResult ¶
type UpdateAppResult struct {
AppID string `json:"app_id,omitempty"`
Credentials Credentials `json:"credentials,omitempty"` // but will undergo some slimming down in the near future (removal of credentials)
OAuthAuthorizeURL string `json:"oauth_authorize_url,omitempty"`
}
UpdateAppResult details returned
type UploadAppArgs ¶
type UserClient ¶
type UserInfoResponse ¶
type ValidateAppManifestResult ¶
type ValidateAppManifestResult struct {
Warnings slackerror.Warnings
}
type VariablesClient ¶
type WorkflowsClient ¶
type WorkflowsClient interface {
WorkflowsTriggersCreate(context.Context, string, TriggerRequest) (types.DeployedTrigger, error)
WorkflowsTriggersUpdate(context.Context, string, TriggerUpdateRequest) (types.DeployedTrigger, error)
WorkflowsTriggersDelete(context.Context, string, string) error
WorkflowsTriggersInfo(context.Context, string, string) (types.DeployedTrigger, error)
WorkflowsTriggersList(context.Context, string, TriggerListRequest) ([]types.DeployedTrigger, string, error)
}
For easy mocking
Source Files
¶
- activity.go
- api_mock.go
- app.go
- auth.go
- channels.go
- client.go
- client_fake.go
- collaborators.go
- datastore.go
- debug.go
- externalauth.go
- functiondistribution.go
- httpclient.go
- icon.go
- icon_mock.go
- s3_upload.go
- s3_upload_mock.go
- session.go
- steps.go
- teams.go
- triggerpermissions.go
- types.go
- users.go
- variables.go
- verify_errors.go
- workflows.go