create

package
v0.0.0-...-0499334 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Adjectives = []string{
	"admiring",
	"adoring",
	"affectionate",
	"amazing",
	"awesome",
	"beautiful",
	"blissful",
	"bold",
	"brave",
	"busy",
	"charming",
	"clever",
	"cool",
	"compassionate",
	"competent",
	"confident",
	"dazzling",
	"determined",
	"distracted",
	"dreamy",
	"eager",
	"ecstatic",
	"elastic",
	"elated",
	"elegant",
	"eloquent",
	"epic",
	"exciting",
	"fervent",
	"festive",
	"flamboyant",
	"focused",
	"friendly",
	"frosty",
	"funny",
	"gallant",
	"gifted",
	"goofy",
	"gracious",
	"great",
	"happy",
	"hardcore",
	"heuristic",
	"hopeful",
	"hungry",
	"infallible",
	"inspiring",
	"interesting",
	"intelligent",
	"jolly",
	"jovial",
	"keen",
	"kind",
	"laughing",
	"loving",
	"lucid",
	"magical",
	"mystifying",
	"modest",
	"musing",
	"nervous",
	"nice",
	"nifty",
	"nostalgic",
	"objective",
	"optimistic",
	"peaceful",
	"pensive",
	"practical",
	"priceless",
	"quirky",
	"quizzical",
	"recursing",
	"relaxed",
	"reverent",
	"romantic",
	"serene",
	"sharp",
	"silly",
	"sleepy",
	"stoic",
	"strange",
	"sweet",
	"tender",
	"trusting",
	"unruffled",
	"upbeat",
	"vibrant",
	"vigilant",
	"vigorous",
	"wizardly",
	"wonderful",
	"xenodochial",
	"youthful",
	"zealous",
	"zen",
}
View Source
var Animals = []string{
	"aardvark",
	"alligator",
	"alpaca",
	"antelope",
	"anteater",
	"armadillo",
	"badger",
	"bat",
	"beaver",
	"bird",
	"bison",
	"bear",
	"boar",
	"buffalo",
	"bull",
	"camel",
	"capybara",
	"cat",
	"chipmunk",
	"cow",
	"coyote",
	"crocodile",
	"deer",
	"dog",
	"dolphin",
	"donkey",
	"dormouse",
	"elephant",
	"elk",
	"ferret",
	"fish",
	"fox",
	"frog",
	"gazelle",
	"gecko",
	"giraffe",
	"goat",
	"gopher",
	"gorilla",
	"groundhog",
	"horse",
	"iguana",
	"insect",
	"jaguar",
	"jellyfish",
	"kangaroo",
	"koala",
	"lamb",
	"lemur",
	"lion",
	"manatee",
	"meerkat",
	"mink",
	"mole",
	"moose",
	"mouse",
	"mule",
	"narwhal",
	"octopus",
	"opossum",
	"orangutan",
	"orca",
	"otter",
	"ox",
	"panda",
	"panther",
	"panda",
	"platypus",
	"porcupine",
	"puma",
	"rabbit",
	"rat",
	"ray",
	"reindeer",
	"rhino",
	"salamander",
	"seal",
	"shark",
	"sheep",
	"skunk",
	"sloth",
	"squirrel",
	"tiger",
	"tortoise",
	"turtle",
	"walrus",
	"weasel",
	"whale",
	"wildcat",
	"wolf",
	"zebra",
}
View Source
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, 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,
) []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

type CreateArgs struct {
	AppName   string
	Template  Template
	GitBranch string
	Subdir    string
}

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 Sampler

type Sampler interface {
	Do(req *http.Request) (res *http.Response, err error)
}

Sampler requests samples from various URLs

type SamplerMock

type SamplerMock struct {
	mock.Mock
}

func NewMockSampler

func NewMockSampler() *SamplerMock

func (*SamplerMock) Do

func (s *SamplerMock) Do(req *http.Request) (*http.Response, error)

type Template

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

Template describes the app template's path and protocol

func ResolveTemplateURL

func ResolveTemplateURL(templateURL string) (Template, error)

ResolveTemplateURL returns a git-clone compatible URL

func (Template) GetSubdir

func (t Template) GetSubdir() string

GetSubdir returns the subdirectory within the repository

func (Template) GetTemplatePath

func (t Template) GetTemplatePath() string

GetTemplatePath returns the path a template is located at

Templates on GitHub use an abbreviated format for concise outputs

func (Template) IsSample

func (t Template) IsSample() bool

IsSample returns if the complete URL points to a sample template

func (Template) IsTrusted

func (t Template) IsTrusted() bool

IsTrusted returns if the template is cloned from a trusted source

func (*Template) SetSubdir

func (t *Template) SetSubdir(subdir string)

SetSubdir sets the subdirectory within the repository

Jump to

Keyboard shortcuts

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