Documentation ¶
Overview ¶
Package services provides Telegram Integration (https://telegram.org/). This is service to interact with / to notify.
Package services provides Telegram Integration (https://telegram.org/). This is service to interact with / to notify.
Index ¶
- func GetAlphaNumberic(n int) string
- func GetAuthorizeUrl() string
- func GetBoardLists(context context.Context, boardId string, accessToken string) string
- func GetBoards(context context.Context, accessToken string) string
- func GetChatIdFromCode(context context.Context, code string) (int, string)
- func GetEventData(request *http.Request) (string, string)
- func PushToTrello(context context.Context, listId string, accessToken string, event string, ...)
- func SendHipchatMessage(context context.Context, text string, room_id string, token string, ...) bool
- func SendPushoverMessage(context context.Context, message string, userKey string) int
- func SendSlackMessage(context context.Context, text string, slack_url string, channel string) bool
- func SendTeleMessage(context context.Context, text string, chat_id int)
- func Telegram(context context.Context, decoder *json.Decoder, token string) string
- type ADClientPayload
- type ADHook
- type ADPayload
- type ADScope
- type BBActor
- type BBApproval
- type BBAuthor
- type BBBranch
- type BBChanges
- type BBComment
- type BBCommits
- type BBContent
- type BBInline
- type BBLink
- type BBLinks
- type BBNew
- type BBParent
- type BBPayload
- type BBPullrequest
- type BBPush
- type BBRepository
- type BBSource
- type CMessage
- type Config
- type DBApplication
- type DBData
- type DBPayload
- type EvalMatch
- type FBMessage
- type FBPayload
- type FBPayloadApp
- type GitCommit
- type GitPayload
- type GitPullRequest
- type GitRepository
- type GitUser
- type GrafanaPayload
- type JJNBuild
- type JJNMessage
- type JJNScm
- type PDMessage
- type SDIncident
- type SDMessage
- type TCBuild
- type TCPayload
- type TRPayload
- type TRRepository
- type TrelloPayLoad
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoardLists ¶
Get list of borads
func GetChatIdFromCode ¶
GetChatIdFromCode Return Chat id from Code
func GetEventData ¶
Return event type and description to post.
func PushToTrello ¶
func PushToTrello( context context.Context, listId string, accessToken string, event string, desc string)
Push to Trello
func SendHipchatMessage ¶
func SendHipchatMessage( context context.Context, text string, room_id string, token string, color string) bool
Send telegram message
func SendPushoverMessage ¶
Send push over notification message
func SendSlackMessage ¶
SendTeleMessage Send telegram message
func SendTeleMessage ¶
SendTeleMessage Send telegram message
Types ¶
type ADClientPayload ¶
type ADPayload ¶
type ADPayload struct { ResourceUrn string Payload ADClientPayload Hook ADHook }
type BBApproval ¶
type BBPayload ¶
type BBPayload struct { Repository BBRepository Push BBPush Actor BBActor Fork BBRepository Comment BBComment Commit BBCommits Pullrequest BBPullrequest Approval BBApproval }
type BBPullrequest ¶
type BBPullrequest struct { Id int Title string Description string State string Author string Source BBSource Destination BBSource Merge_commit BBCommits Participants []BBActor Reviewers []BBActor Close_source_branch bool Closed_by BBActor Reason string Created_on string Updated_on string Links BBLinks }
type BBRepository ¶
type BBSource ¶
type BBSource struct { Branch BBBranch Commit BBCommits Repository BBRepository }
type DBApplication ¶
type DBApplication struct {
Name string
}
type FBPayloadApp ¶
type GitPayload ¶
type GitPayload struct { Zen string Ref string Compare string Repository GitRepository Commits []GitCommit Action string Number int Pull_request GitPullRequest Pusher User }
type GitPullRequest ¶
type GitRepository ¶
type GrafanaPayload ¶
type SDIncident ¶
type SDMessage ¶
type SDMessage struct { Incident SDIncident Version int }
type TCBuild ¶
type TCBuild struct { BuildStatus string BuildResult string BuildResultPrevious string BuildResultDetalta string NotifyType string BuildFullName string BuildName string BuildId string BuildTypeId string BuildInternalTypeId string BuildExternalTypeId string BuildStatusUrl string BuildStatusHtml string RootUrl string ProjectName string ProjectId string ProjectInternalId string ProjectExternalId string BuildNumber string AgentName string AgentOs string AgentHostname string TriggeredBy string Message string Text string BuildStateDescription string }
type TRPayload ¶
type TRPayload struct { Author_email string Author_name string Branch string Build_url string Commit string Committed_at string Committer_email string Committer_name string Compare_url string Duration int Finished_at string Id int Message string Number string Repository TRRepository Started_at string State string Status int Status_message string Type string Pull_request bool Pull_request_number string Pull_request_type string Tag string }
type TrelloPayLoad ¶
To send as trello api payload.
Click to show internal directories.
Click to hide internal directories.