Versions in this module Expand all Collapse all v0 v0.3.8 May 16, 2024 v0.3.6 May 7, 2024 v0.3.5 Apr 29, 2024 v0.3.4 Apr 28, 2024 v0.3.3 Apr 22, 2024 v0.3.2 Apr 14, 2024 v0.3.1 Apr 6, 2024 v0.3.0 Apr 5, 2024 Changes in this version + type OAuth2Provider string + const OAuth2GithubProvider + const OAuth2LarkProvider + func (o OAuth2Provider) String() string v0.2.0 Jan 31, 2024 Changes in this version + const TextBlack + const TextBlue + const TextCyan + const TextGreen + const TextMagenta + const TextRed + const TextWhite + const TextYellow + var TemplateIgnore = ".templateignore" + var TemplateParseIgnore = ".templateparseignore" + var Version string + func Black(msg string) string + func Blue(msg string) string + func CommitAndPushGithubRepo(directory, branch, path, accessToken string, auth *http.BasicAuth) error + func CopyDir(srcPath string, destPath string) error + func CreateGithubRepo(organization, name, description, token string, private bool) (*github.Repository, error) + func Cyan(msg string) string + func FileCopy(src, dst string) (int64, error) + func FileCreate(content bytes.Buffer, name string) error + func FileMonitoringById(ctx context.Context, filePth string, id string, group string, ...) + func FileOpen(content bytes.Buffer, name string, mode os.FileMode) error + func Generate(c *TemplateConfig) (err error) + func GetAppPath() string + func GetCurrentPath() string + func GetFileSize(filename string) int64 + func GetGithubRepoAllBranches(ctx context.Context, organization, name, token string) ([]*github.Branch, error) + func GetInstallPath() string + func GetLatestVersion() string + func GetOrganizationsFromGithub(ctx context.Context, conf *oauth2.Config, accessToken string) ([]string, error) + func GetParseFromTemplate(dir, subPath string) (map[string]string, error) + func GetSubPath(directory string) ([]string, error) + func GetTmpPath() string + func GistClone(id, dir, accessToken string) error + func GitClone(url, branch, directory string, noCheckout bool, accessToken string) (*git.Repository, error) + func GitCloneSSH(url, directory, reference, privateKeyFile, password string) error + func GitRemote(url, directory string) error + func Green(msg string) string + func InArray(vals []string, array []string, replace string, n int) bool + func IsWindows() bool + func Magenta(msg string) string + func NowEndDay() time.Time + func NowFormatDay() string + func NowFormatHour() string + func NowFormatMinute() string + func NowFormatMonth() string + func NowFormatSecond() string + func NowFormatYear() string + func NowStartDay() time.Time + func PathCreate(dir string) error + func PathExist(addr string) bool + func Pluralize(word string) string + func Red(msg string) string + func SetColor(msg string, conf, bg, text int) string + func SimpleID() string + func TimeEndDay(t time.Time) time.Time + func TimeFormatDay(t time.Time) string + func TimeFormatHour(t time.Time) string + func TimeFormatMinute(t time.Time) string + func TimeFormatMonth(t time.Time) string + func TimeFormatSecond(t time.Time) string + func TimeFormatYear(t time.Time) string + func TimeStartDay(t time.Time) time.Time + func White(msg string) string + func Yellow(msg string) string + type AccessType string + const APIAccessType + const ComponentAccessType + const DirectoryAccessType + const MenuAccessType + func (a AccessType) String() string + type BaseRule struct + ID string + Len uint8 + Max uint8 + Message string + Min uint8 + Pattern string + Required bool + Type RuleType + ValidateTrigger string + WarningOnly bool + Whitespace bool + type Generator struct + Cfg interface{} + DestinationPath string + SubPath string + TemplateIgnoreDirs []string + TemplateIgnoreFiles []string + TemplateParseIgnoreDirs []string + TemplateParseIgnoreFiles []string + TemplatePath string + func (e *Generator) Traverse() error + func (e *Generator) TraverseFunc(path string, f os.DirEntry, err error) error + type GithubConfig struct + Description string + Name string + Organization string + Secrets map[string]string + Token string + type GithubOrganization struct + AvatarURL string + Description string + EventsURL string + HooksURL string + ID int64 + IssuesURL string + Login string + MembersURL string + NodeID string + PublicMembersURL string + ReposURL string + URL string + type GithubUser struct + AvatarURL string + Bio string + Blog string + Collaborators int64 + Company string + CreatedAt string + DiskUsage int64 + Email string + EventsURL string + Followers int64 + FollowersURL string + Following int64 + FollowingURL string + GistsURL string + GravatarID string + HTMLURL string + Hireable bool + ID int64 + Location string + Login string + Name string + NodeID string + OrganizationsURL string + OwnedPrivateRepos int64 + Plan struct{ ... } + PrivateGists int64 + PublicGists int64 + PublicRepos int64 + ReceivedEventsURL string + ReposURL string + SiteAdmin bool + StarredURL string + SubscriptionsURL string + TotalPrivateRepos int64 + TwitterUsername string + TwoFactorAuth bool + Type string + URL string + UpdatedAt string + func GetUserFromGithub(ctx context.Context, conf *oauth2.Config, accessToken string) (*GithubUser, error) + type ReplaceHelper struct + NewText string + OldText string + Root string + func (h *ReplaceHelper) DoWork() error + type RuleType string + const RUleTypeBool + const RUleTypeDate + const RUleTypeEmail + const RUleTypeEnum + const RUleTypeFloat + const RUleTypeHex + const RUleTypeInt + const RUleTypeMethod + const RUleTypeNumber + const RUleTypeObject + const RUleTypeRegexp + const RUleTypeString + const RUleTypeUrl + type Task struct + Args []string + Body io.Reader + Command string + Endpoint string + ID string + Metadata map[string]string + Method string + Name string + Python string + Timeout time.Duration + Writer io.Writer + func (t *Task) Run() error + type TemplateConfig struct + CreateRepo bool + Destination string + Github *GithubConfig + Ignore []string + Params interface{} + Service string + TemplateLocal string + TemplateLocalSubPath string + TemplateUrl string + func (e *TemplateConfig) OnChange() + type TreeImp interface + AddChildren func([]TreeImp) + GetIndex func() string + GetParentID func() string + SortChildren func() + func BuildTree(list []TreeImp, parentID string) []TreeImp