Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureDirectory(dirName string, mode int) error
- func GetChecksum(file string) (string, error)
- func ValidateChecksum(file, checksumsFile string) (bool, error)
- type BitbucketPushEvent
- type BitbucketServerPushEvent
- type BitbucketServerWebhookParser
- func (e *BitbucketServerWebhookParser) ConvertToJSON() (string, error)
- func (e *BitbucketServerWebhookParser) GetBody() string
- func (e *BitbucketServerWebhookParser) GetHeader(key string) string
- func (e *BitbucketServerWebhookParser) GetHubSignature() string
- func (e *BitbucketServerWebhookParser) GetUserAgent() string
- func (e *BitbucketServerWebhookParser) LoadFromJSON(data []byte) (bool, error)
- func (e *BitbucketServerWebhookParser) SetBody(body string)
- func (e *BitbucketServerWebhookParser) SetHeader(key string, value string)
- func (e *BitbucketServerWebhookParser) SetHubSignature(hubSignature string)
- func (e *BitbucketServerWebhookParser) SetUserAgent(userAgent string)
- func (e *BitbucketServerWebhookParser) VerifySignature(secret string) bool
- type GithubCreateEvent
- type GithubPingEvent
- type GithubWebhookParser
- func (e *GithubWebhookParser) ConvertToJSON() (string, error)
- func (e *GithubWebhookParser) GetBody() string
- func (e *GithubWebhookParser) GetGitHubEvent() string
- func (e *GithubWebhookParser) GetGithubDelivery() string
- func (e *GithubWebhookParser) GetHeader(key string) string
- func (e *GithubWebhookParser) GetHubSignature() string
- func (e *GithubWebhookParser) GetUserAgent() string
- func (e *GithubWebhookParser) LoadFromJSON(data []byte) (bool, error)
- func (e *GithubWebhookParser) SetBody(body string)
- func (e *GithubWebhookParser) SetGitHubEvent(githubEvent string)
- func (e *GithubWebhookParser) SetGithubDelivery(githubDelivery string)
- func (e *GithubWebhookParser) SetHeader(key string, value string)
- func (e *GithubWebhookParser) SetHubSignature(hubSignature string)
- func (e *GithubWebhookParser) SetUserAgent(userAgent string)
- func (e *GithubWebhookParser) SignBody(secret, body []byte) []byte
- func (e *GithubWebhookParser) VerifySignature(secret string) bool
- type GitlabTagPushEvent
- type GitlabWebhookParser
- func (e *GitlabWebhookParser) ConvertToJSON() (string, error)
- func (e *GitlabWebhookParser) GetBody() string
- func (e *GitlabWebhookParser) GetGitlabEvent() string
- func (e *GitlabWebhookParser) GetGitlabToken() string
- func (e *GitlabWebhookParser) GetHeader(key string) string
- func (e *GitlabWebhookParser) LoadFromJSON(data []byte) (bool, error)
- func (e *GitlabWebhookParser) SetBody(body string)
- func (e *GitlabWebhookParser) SetGitlabEvent(gitlabEvent string)
- func (e *GitlabWebhookParser) SetGitlabToken(gitlabToken string)
- func (e *GitlabWebhookParser) SetHeader(key string, value string)
- func (e *GitlabWebhookParser) VerifySecret(secretToken string) bool
- type Result
- type Shell
- type Spinner
- type Validator
- func (v *Validator) IsEmpty(item string) bool
- func (v *Validator) IsIn(item string, list []string) bool
- func (v *Validator) IsJSON(str string) bool
- func (v *Validator) IsSlug(slug string, min int, max int) bool
- func (v *Validator) IsSlugs(slugs []string, min int, max int) bool
- func (v *Validator) IsUUID(uuid string) bool
- func (v *Validator) IsUUID3(uuid string) bool
- func (v *Validator) IsUUID4(uuid string) bool
- func (v *Validator) IsUUID5(uuid string) bool
Constants ¶
const ( // UUID3 regex expr UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" // UUID4 regex expr UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" // UUID5 regex expr UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" // UUID regex expr UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" // SLUG regex expr SLUG string = "^[a-z0-9]+(?:_[a-z0-9]+)*$" )
const ClearLine = "\r\033[K"
ClearLine go to the beginning of the line and clear it
Variables ¶
var ( Spin1 = `|/-\` Spin2 = `◴◷◶◵` Spin3 = `◰◳◲◱` Spin4 = `◐◓◑◒` Spin5 = `▉▊▋▌▍▎▏▎▍▌▋▊▉` Spin6 = `▌▄▐▀` Spin7 = `╫╪` Spin8 = `■□▪▫` Spin9 = `←↑→↓` Spin10 = `⦾⦿` Spin11 = `⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏` Spin12 = `⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓` Spin13 = `⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆` Spin14 = `⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋` Spin15 = `⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁` Spin16 = `⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈` Spin17 = `⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈` )
Spinner types.
Functions ¶
func EnsureDirectory ¶
EnsureDirectory ensures that directory exists
func ValidateChecksum ¶
ValidateChecksum validates a checksum
Types ¶
type BitbucketPushEvent ¶
type BitbucketPushEvent struct { Push struct { Changes []struct { Forced bool `json:"forced"` Old interface{} `json:"old"` Links struct { Commits struct { Href string `json:"href"` } `json:"commits"` } `json:"links"` Created bool `json:"created"` Truncated bool `json:"truncated"` Closed bool `json:"closed"` New struct { Name string `json:"name"` Links struct { Commits struct { Href string `json:"href"` } `json:"commits"` Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` } `json:"links"` Tagger interface{} `json:"tagger"` Date interface{} `json:"date"` Message interface{} `json:"message"` Type string `json:"type"` Target struct { Rendered struct { } `json:"rendered"` Hash string `json:"hash"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` } `json:"links"` Author struct { Raw string `json:"raw"` Type string `json:"type"` User struct { Username string `json:"username"` DisplayName string `json:"display_name"` UUID string `json:"uuid"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"links"` Nickname string `json:"nickname"` Type string `json:"type"` AccountID string `json:"account_id"` } `json:"user"` } `json:"author"` Summary struct { Raw string `json:"raw"` Markup string `json:"markup"` HTML string `json:"html"` Type string `json:"type"` } `json:"summary"` Parents []interface{} `json:"parents"` Date time.Time `json:"date"` Message string `json:"message"` Type string `json:"type"` Properties struct { } `json:"properties"` } `json:"target"` } `json:"new"` } `json:"changes"` } `json:"push"` Actor struct { Username string `json:"username"` DisplayName string `json:"display_name"` UUID string `json:"uuid"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"links"` Nickname string `json:"nickname"` Type string `json:"type"` AccountID string `json:"account_id"` } `json:"actor"` Repository struct { Scm string `json:"scm"` Website string `json:"website"` Name string `json:"name"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"links"` FullName string `json:"full_name"` Owner struct { Username string `json:"username"` DisplayName string `json:"display_name"` UUID string `json:"uuid"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"links"` Nickname string `json:"nickname"` Type string `json:"type"` AccountID string `json:"account_id"` } `json:"owner"` Type string `json:"type"` IsPrivate bool `json:"is_private"` UUID string `json:"uuid"` } `json:"repository"` }
BitbucketPushEvent when a new commit pushed or branch, tag got created
func (*BitbucketPushEvent) ConvertToJSON ¶
func (e *BitbucketPushEvent) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BitbucketPushEvent) LoadFromJSON ¶
func (e *BitbucketPushEvent) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type BitbucketServerPushEvent ¶
type BitbucketServerPushEvent struct { EventKey string `json:"eventKey"` Date string `json:"date"` Actor struct { Name string `json:"name"` EmailAddress string `json:"emailAddress"` ID int `json:"id"` DisplayName string `json:"displayName"` Active bool `json:"active"` Slug string `json:"slug"` Type string `json:"type"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` } `json:"actor"` Repository struct { Slug string `json:"slug"` ID int `json:"id"` Name string `json:"name"` ScmID string `json:"scmId"` State string `json:"state"` StatusMessage string `json:"statusMessage"` Forkable bool `json:"forkable"` Project struct { Key string `json:"key"` ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Owner struct { Name string `json:"name"` EmailAddress string `json:"emailAddress"` ID int `json:"id"` DisplayName string `json:"displayName"` Active bool `json:"active"` Slug string `json:"slug"` Type string `json:"type"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` } `json:"owner"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` } `json:"project"` Public bool `json:"public"` Links struct { Clone []struct { Href string `json:"href"` Name string `json:"name"` } `json:"clone"` Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` } `json:"repository"` Changes []struct { Ref struct { ID string `json:"id"` DisplayID string `json:"displayId"` Type string `json:"type"` } `json:"ref"` RefID string `json:"refId"` FromHash string `json:"fromHash"` ToHash string `json:"toHash"` Type string `json:"type"` } `json:"changes"` }
BitbucketServerPushEvent event
func (*BitbucketServerPushEvent) ConvertToJSON ¶
func (e *BitbucketServerPushEvent) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BitbucketServerPushEvent) GetTag ¶
func (e *BitbucketServerPushEvent) GetTag() string
GetTag gets the created tag
func (*BitbucketServerPushEvent) LoadFromJSON ¶
func (e *BitbucketServerPushEvent) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type BitbucketServerWebhookParser ¶
type BitbucketServerWebhookParser struct { UserAgent string HubSignature string Headers map[string]string Body string }
BitbucketServerWebhookParser struct
func (*BitbucketServerWebhookParser) ConvertToJSON ¶
func (e *BitbucketServerWebhookParser) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*BitbucketServerWebhookParser) GetBody ¶
func (e *BitbucketServerWebhookParser) GetBody() string
GetBody gets body
func (*BitbucketServerWebhookParser) GetHeader ¶
func (e *BitbucketServerWebhookParser) GetHeader(key string) string
GetHeader gets header
func (*BitbucketServerWebhookParser) GetHubSignature ¶
func (e *BitbucketServerWebhookParser) GetHubSignature() string
GetHubSignature gets hub signature
func (*BitbucketServerWebhookParser) GetUserAgent ¶
func (e *BitbucketServerWebhookParser) GetUserAgent() string
GetUserAgent gets user agent
func (*BitbucketServerWebhookParser) LoadFromJSON ¶
func (e *BitbucketServerWebhookParser) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
func (*BitbucketServerWebhookParser) SetBody ¶
func (e *BitbucketServerWebhookParser) SetBody(body string)
SetBody sets body
func (*BitbucketServerWebhookParser) SetHeader ¶
func (e *BitbucketServerWebhookParser) SetHeader(key string, value string)
SetHeader sets header
func (*BitbucketServerWebhookParser) SetHubSignature ¶
func (e *BitbucketServerWebhookParser) SetHubSignature(hubSignature string)
SetHubSignature sets hub signature
func (*BitbucketServerWebhookParser) SetUserAgent ¶
func (e *BitbucketServerWebhookParser) SetUserAgent(userAgent string)
SetUserAgent sets user agent
func (*BitbucketServerWebhookParser) VerifySignature ¶
func (e *BitbucketServerWebhookParser) VerifySignature(secret string) bool
VerifySignature verify signature
type GithubCreateEvent ¶
type GithubCreateEvent struct { Ref string `json:"ref"` RefType string `json:"ref_type"` MasterBranch string `json:"master_branch"` Description string `json:"description"` PusherType string `json:"pusher_type"` Repository struct { ID int `json:"id"` NodeID string `json:"node_id"` Name string `json:"name"` FullName string `json:"full_name"` Private bool `json:"private"` Owner struct { Login string `json:"login"` ID int `json:"id"` NodeID string `json:"node_id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` HTMLURL string `json:"html_url"` FollowersURL string `json:"followers_url"` FollowingURL string `json:"following_url"` GistsURL string `json:"gists_url"` StarredURL string `json:"starred_url"` SubscriptionsURL string `json:"subscriptions_url"` OrganizationsURL string `json:"organizations_url"` ReposURL string `json:"repos_url"` EventsURL string `json:"events_url"` ReceivedEventsURL string `json:"received_events_url"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` } `json:"owner"` HTMLURL string `json:"html_url"` Description string `json:"description"` Fork bool `json:"fork"` URL string `json:"url"` ForksURL string `json:"forks_url"` KeysURL string `json:"keys_url"` CollaboratorsURL string `json:"collaborators_url"` TeamsURL string `json:"teams_url"` HooksURL string `json:"hooks_url"` IssueEventsURL string `json:"issue_events_url"` EventsURL string `json:"events_url"` AssigneesURL string `json:"assignees_url"` BranchesURL string `json:"branches_url"` TagsURL string `json:"tags_url"` BlobsURL string `json:"blobs_url"` GitTagsURL string `json:"git_tags_url"` GitRefsURL string `json:"git_refs_url"` TreesURL string `json:"trees_url"` StatusesURL string `json:"statuses_url"` LanguagesURL string `json:"languages_url"` StargazersURL string `json:"stargazers_url"` ContributorsURL string `json:"contributors_url"` SubscribersURL string `json:"subscribers_url"` SubscriptionURL string `json:"subscription_url"` CommitsURL string `json:"commits_url"` GitCommitsURL string `json:"git_commits_url"` CommentsURL string `json:"comments_url"` IssueCommentURL string `json:"issue_comment_url"` ContentsURL string `json:"contents_url"` CompareURL string `json:"compare_url"` MergesURL string `json:"merges_url"` ArchiveURL string `json:"archive_url"` DownloadsURL string `json:"downloads_url"` IssuesURL string `json:"issues_url"` PullsURL string `json:"pulls_url"` MilestonesURL string `json:"milestones_url"` NotificationsURL string `json:"notifications_url"` LabelsURL string `json:"labels_url"` ReleasesURL string `json:"releases_url"` DeploymentsURL string `json:"deployments_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` PushedAt time.Time `json:"pushed_at"` GitURL string `json:"git_url"` SSHURL string `json:"ssh_url"` CloneURL string `json:"clone_url"` SvnURL string `json:"svn_url"` Homepage string `json:"homepage"` Size int `json:"size"` StargazersCount int `json:"stargazers_count"` WatchersCount int `json:"watchers_count"` Language string `json:"language"` HasIssues bool `json:"has_issues"` HasProjects bool `json:"has_projects"` HasDownloads bool `json:"has_downloads"` HasWiki bool `json:"has_wiki"` HasPages bool `json:"has_pages"` ForksCount int `json:"forks_count"` MirrorURL interface{} `json:"mirror_url"` Archived bool `json:"archived"` Disabled bool `json:"disabled"` OpenIssuesCount int `json:"open_issues_count"` License struct { Key string `json:"key"` Name string `json:"name"` SpdxID string `json:"spdx_id"` URL string `json:"url"` NodeID string `json:"node_id"` } `json:"license"` Forks int `json:"forks"` OpenIssues int `json:"open_issues"` Watchers int `json:"watchers"` DefaultBranch string `json:"default_branch"` } `json:"repository"` Sender struct { Login string `json:"login"` ID int `json:"id"` NodeID string `json:"node_id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` HTMLURL string `json:"html_url"` FollowersURL string `json:"followers_url"` FollowingURL string `json:"following_url"` GistsURL string `json:"gists_url"` StarredURL string `json:"starred_url"` SubscriptionsURL string `json:"subscriptions_url"` OrganizationsURL string `json:"organizations_url"` ReposURL string `json:"repos_url"` EventsURL string `json:"events_url"` ReceivedEventsURL string `json:"received_events_url"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` } `json:"sender"` }
GithubCreateEvent event received any time a Branch or Tag is created.
func (*GithubCreateEvent) ConvertToJSON ¶
func (e *GithubCreateEvent) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*GithubCreateEvent) LoadFromJSON ¶
func (e *GithubCreateEvent) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type GithubPingEvent ¶
type GithubPingEvent struct { Zen string `json:"zen"` HookID int `json:"hook_id"` Hook struct { Type string `json:"type"` ID int `json:"id"` Name string `json:"name"` Active bool `json:"active"` Events []string `json:"events"` Config struct { ContentType string `json:"content_type"` InsecureSsl string `json:"insecure_ssl"` Secret string `json:"secret"` URL string `json:"url"` } `json:"config"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` URL string `json:"url"` TestURL string `json:"test_url"` PingURL string `json:"ping_url"` LastResponse struct { Code interface{} `json:"code"` Status string `json:"status"` Message interface{} `json:"message"` } `json:"last_response"` } `json:"hook"` Repository struct { ID int `json:"id"` NodeID string `json:"node_id"` Name string `json:"name"` FullName string `json:"full_name"` Private bool `json:"private"` Owner struct { Login string `json:"login"` ID int `json:"id"` NodeID string `json:"node_id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` HTMLURL string `json:"html_url"` FollowersURL string `json:"followers_url"` FollowingURL string `json:"following_url"` GistsURL string `json:"gists_url"` StarredURL string `json:"starred_url"` SubscriptionsURL string `json:"subscriptions_url"` OrganizationsURL string `json:"organizations_url"` ReposURL string `json:"repos_url"` EventsURL string `json:"events_url"` ReceivedEventsURL string `json:"received_events_url"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` } `json:"owner"` HTMLURL string `json:"html_url"` Description string `json:"description"` Fork bool `json:"fork"` URL string `json:"url"` ForksURL string `json:"forks_url"` KeysURL string `json:"keys_url"` CollaboratorsURL string `json:"collaborators_url"` TeamsURL string `json:"teams_url"` HooksURL string `json:"hooks_url"` IssueEventsURL string `json:"issue_events_url"` EventsURL string `json:"events_url"` AssigneesURL string `json:"assignees_url"` BranchesURL string `json:"branches_url"` TagsURL string `json:"tags_url"` BlobsURL string `json:"blobs_url"` GitTagsURL string `json:"git_tags_url"` GitRefsURL string `json:"git_refs_url"` TreesURL string `json:"trees_url"` StatusesURL string `json:"statuses_url"` LanguagesURL string `json:"languages_url"` StargazersURL string `json:"stargazers_url"` ContributorsURL string `json:"contributors_url"` SubscribersURL string `json:"subscribers_url"` SubscriptionURL string `json:"subscription_url"` CommitsURL string `json:"commits_url"` GitCommitsURL string `json:"git_commits_url"` CommentsURL string `json:"comments_url"` IssueCommentURL string `json:"issue_comment_url"` ContentsURL string `json:"contents_url"` CompareURL string `json:"compare_url"` MergesURL string `json:"merges_url"` ArchiveURL string `json:"archive_url"` DownloadsURL string `json:"downloads_url"` IssuesURL string `json:"issues_url"` PullsURL string `json:"pulls_url"` MilestonesURL string `json:"milestones_url"` NotificationsURL string `json:"notifications_url"` LabelsURL string `json:"labels_url"` ReleasesURL string `json:"releases_url"` DeploymentsURL string `json:"deployments_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` PushedAt time.Time `json:"pushed_at"` GitURL string `json:"git_url"` SSHURL string `json:"ssh_url"` CloneURL string `json:"clone_url"` SvnURL string `json:"svn_url"` Homepage string `json:"homepage"` Size int `json:"size"` StargazersCount int `json:"stargazers_count"` WatchersCount int `json:"watchers_count"` Language string `json:"language"` HasIssues bool `json:"has_issues"` HasProjects bool `json:"has_projects"` HasDownloads bool `json:"has_downloads"` HasWiki bool `json:"has_wiki"` HasPages bool `json:"has_pages"` ForksCount int `json:"forks_count"` MirrorURL interface{} `json:"mirror_url"` Archived bool `json:"archived"` Disabled bool `json:"disabled"` OpenIssuesCount int `json:"open_issues_count"` License struct { Key string `json:"key"` Name string `json:"name"` SpdxID string `json:"spdx_id"` URL string `json:"url"` NodeID string `json:"node_id"` } `json:"license"` Forks int `json:"forks"` OpenIssues int `json:"open_issues"` Watchers int `json:"watchers"` DefaultBranch string `json:"default_branch"` } `json:"repository"` Sender struct { Login string `json:"login"` ID int `json:"id"` NodeID string `json:"node_id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` HTMLURL string `json:"html_url"` FollowersURL string `json:"followers_url"` FollowingURL string `json:"following_url"` GistsURL string `json:"gists_url"` StarredURL string `json:"starred_url"` SubscriptionsURL string `json:"subscriptions_url"` OrganizationsURL string `json:"organizations_url"` ReposURL string `json:"repos_url"` EventsURL string `json:"events_url"` ReceivedEventsURL string `json:"received_events_url"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` } `json:"sender"` }
GithubPingEvent when a new webhook created
func (*GithubPingEvent) ConvertToJSON ¶
func (e *GithubPingEvent) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*GithubPingEvent) LoadFromJSON ¶
func (e *GithubPingEvent) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type GithubWebhookParser ¶
type GithubWebhookParser struct { UserAgent string GithubDelivery string GitHubEvent string HubSignature string Headers map[string]string Body string }
GithubWebhookParser struct
func (*GithubWebhookParser) ConvertToJSON ¶
func (e *GithubWebhookParser) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*GithubWebhookParser) GetBody ¶
func (e *GithubWebhookParser) GetBody() string
GetBody gets body
func (*GithubWebhookParser) GetGitHubEvent ¶
func (e *GithubWebhookParser) GetGitHubEvent() string
GetGitHubEvent gets github event
func (*GithubWebhookParser) GetGithubDelivery ¶
func (e *GithubWebhookParser) GetGithubDelivery() string
GetGithubDelivery gets github delivery
func (*GithubWebhookParser) GetHeader ¶
func (e *GithubWebhookParser) GetHeader(key string) string
GetHeader gets header
func (*GithubWebhookParser) GetHubSignature ¶
func (e *GithubWebhookParser) GetHubSignature() string
GetHubSignature gets hub signature
func (*GithubWebhookParser) GetUserAgent ¶
func (e *GithubWebhookParser) GetUserAgent() string
GetUserAgent gets user agent
func (*GithubWebhookParser) LoadFromJSON ¶
func (e *GithubWebhookParser) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
func (*GithubWebhookParser) SetBody ¶
func (e *GithubWebhookParser) SetBody(body string)
SetBody sets body
func (*GithubWebhookParser) SetGitHubEvent ¶
func (e *GithubWebhookParser) SetGitHubEvent(githubEvent string)
SetGitHubEvent sets github event
func (*GithubWebhookParser) SetGithubDelivery ¶
func (e *GithubWebhookParser) SetGithubDelivery(githubDelivery string)
SetGithubDelivery sets github delivery
func (*GithubWebhookParser) SetHeader ¶
func (e *GithubWebhookParser) SetHeader(key string, value string)
SetHeader sets header
func (*GithubWebhookParser) SetHubSignature ¶
func (e *GithubWebhookParser) SetHubSignature(hubSignature string)
SetHubSignature sets hub signature
func (*GithubWebhookParser) SetUserAgent ¶
func (e *GithubWebhookParser) SetUserAgent(userAgent string)
SetUserAgent sets user agent
func (*GithubWebhookParser) SignBody ¶
func (e *GithubWebhookParser) SignBody(secret, body []byte) []byte
SignBody signs body
func (*GithubWebhookParser) VerifySignature ¶
func (e *GithubWebhookParser) VerifySignature(secret string) bool
VerifySignature verify signature
type GitlabTagPushEvent ¶
type GitlabTagPushEvent struct { ObjectKind string `json:"object_kind"` EventName string `json:"event_name"` Before string `json:"before"` After string `json:"after"` Ref string `json:"ref"` CheckoutSha string `json:"checkout_sha"` Message string `json:"message"` UserID int `json:"user_id"` UserName string `json:"user_name"` UserUsername string `json:"user_username"` UserEmail string `json:"user_email"` UserAvatar string `json:"user_avatar"` ProjectID int `json:"project_id"` Project struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` WebURL string `json:"web_url"` AvatarURL interface{} `json:"avatar_url"` GitSSHURL string `json:"git_ssh_url"` GitHTTPURL string `json:"git_http_url"` Namespace string `json:"namespace"` VisibilityLevel int `json:"visibility_level"` PathWithNamespace string `json:"path_with_namespace"` DefaultBranch string `json:"default_branch"` CiConfigPath interface{} `json:"ci_config_path"` Homepage string `json:"homepage"` URL string `json:"url"` SSHURL string `json:"ssh_url"` HTTPURL string `json:"http_url"` } `json:"project"` Commits []struct { ID string `json:"id"` Message string `json:"message"` Timestamp time.Time `json:"timestamp"` URL string `json:"url"` Author struct { Name string `json:"name"` Email string `json:"email"` } `json:"author"` Added []string `json:"added"` Modified []interface{} `json:"modified"` Removed []interface{} `json:"removed"` } `json:"commits"` TotalCommitsCount int `json:"total_commits_count"` PushOptions struct { } `json:"push_options"` Repository struct { Name string `json:"name"` URL string `json:"url"` Description string `json:"description"` Homepage string `json:"homepage"` GitHTTPURL string `json:"git_http_url"` GitSSHURL string `json:"git_ssh_url"` VisibilityLevel int `json:"visibility_level"` } `json:"repository"` }
GitlabTagPushEvent when a new tag got created
func (*GitlabTagPushEvent) ConvertToJSON ¶
func (e *GitlabTagPushEvent) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*GitlabTagPushEvent) LoadFromJSON ¶
func (e *GitlabTagPushEvent) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type GitlabWebhookParser ¶
type GitlabWebhookParser struct { GitlabEvent string GitlabToken string Headers map[string]string Body string }
GitlabWebhookParser struct
func (*GitlabWebhookParser) ConvertToJSON ¶
func (e *GitlabWebhookParser) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*GitlabWebhookParser) GetBody ¶
func (e *GitlabWebhookParser) GetBody() string
GetBody gets body
func (*GitlabWebhookParser) GetGitlabEvent ¶
func (e *GitlabWebhookParser) GetGitlabEvent() string
GetGitlabEvent gets gitlab event
func (*GitlabWebhookParser) GetGitlabToken ¶
func (e *GitlabWebhookParser) GetGitlabToken() string
GetGitlabToken gets gitlab token
func (*GitlabWebhookParser) GetHeader ¶
func (e *GitlabWebhookParser) GetHeader(key string) string
GetHeader gets header
func (*GitlabWebhookParser) LoadFromJSON ¶
func (e *GitlabWebhookParser) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
func (*GitlabWebhookParser) SetBody ¶
func (e *GitlabWebhookParser) SetBody(body string)
SetBody sets body
func (*GitlabWebhookParser) SetGitlabEvent ¶
func (e *GitlabWebhookParser) SetGitlabEvent(gitlabEvent string)
SetGitlabEvent sets gitlab event
func (*GitlabWebhookParser) SetGitlabToken ¶
func (e *GitlabWebhookParser) SetGitlabToken(gitlabToken string)
SetGitlabToken sets gitlab token
func (*GitlabWebhookParser) SetHeader ¶
func (e *GitlabWebhookParser) SetHeader(key string, value string)
SetHeader sets header
func (*GitlabWebhookParser) VerifySecret ¶
func (e *GitlabWebhookParser) VerifySecret(secretToken string) bool
VerifySecret verifies the secret
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner main type
type Validator ¶
type Validator struct { }
Validator util