Documentation
¶
Index ¶
- Variables
- func Create(ctx context.Context, clients *shared.ClientFactory, log *logger.Logger, ...) (appDirPath string, err error)
- func InstallProjectDependencies(ctx context.Context, clients *shared.ClientFactory, projectDirPath string, ...) []string
- type CreateArgs
- type GithubRepo
- type Sampler
- type SamplerMock
- type Template
Constants ¶
This section is empty.
Variables ¶
var GetSampleRepos = func(client Sampler) ([]GithubRepo, error) { repos, err := getSampleReposFromSlack(client) if err != nil || len(repos) == 0 { repos, err = getSampleReposFromGitHub(client) if err != nil { return []GithubRepo{}, slackerror.Wrap(err, slackerror.ErrSampleCreate) } } return repos, nil }
GetSampleRepos requests a list of samples from Slack API and falls back to the GitHub API
Functions ¶
func Create ¶
func Create(ctx context.Context, clients *shared.ClientFactory, log *logger.Logger, createArgs CreateArgs) (appDirPath string, err error)
Create will create a new Slack app on the file system and app manifest on the Slack API.
func InstallProjectDependencies ¶
func InstallProjectDependencies( ctx context.Context, clients *shared.ClientFactory, projectDirPath string, manifestSource config.ManifestSource, ) []string
InstallProjectDependencies installs the project runtime dependencies or continues with next steps if that fails. You can specify the manifestSource for the project configuration file (default: ManifestSourceLocal)
Types ¶
type CreateArgs ¶
CreateArgs are the arguments passed into the Create function
type GithubRepo ¶
type GithubRepo struct {
ID int
Name string
FullName string `json:"full_name"`
Description string
Language string
CreatedAt string `json:"created_at"`
StargazersCount int `json:"stargazers_count"`
}
GithubRepo is the single repository data structure
type SamplerMock ¶
func NewMockSampler ¶
func NewMockSampler() *SamplerMock
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template describes the app template's path and protocol
func ResolveTemplateURL ¶
ResolveTemplateURL returns a git-clone compatible URL
func (Template) GetTemplatePath ¶
GetTemplatePath returns the path a template is located at
Templates on GitHub use an abbreviated format for concise outputs