Documentation
¶
Index ¶
- Constants
- func GetSecret(projectID, secretName string) ([]byte, error)
- type Firestore
- func (f *Firestore) LoadAccessToken(ctx context.Context, collectionID string) (string, error)
- func (f *Firestore) LoadRetryKey(ctx context.Context, collectionID string, uuid string) (*RetryKey, error)
- func (f *Firestore) SaveAccessToken(ctx context.Context, collectionID string, token string) error
- func (f *Firestore) SaveRetryKey(ctx context.Context, collectionID string, uuid string) error
- type LineWorksAccessToken
- type LineWorksBot
- type RetryKey
- type TextContent
- type TextMessage
- type TokenResponse
Constants ¶
View Source
const MessageURLPattern = "https://www.worksapis.com/v1.0/bots/%s/channels/%s/messages"
View Source
const TokenURL = "https://auth.worksmobile.com/oauth2/v2.0/token"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Firestore ¶
type Firestore struct {
// contains filtered or unexported fields
}
func NewFirestore ¶
func (*Firestore) LoadAccessToken ¶
func (*Firestore) LoadRetryKey ¶
func (*Firestore) SaveAccessToken ¶
type LineWorksAccessToken ¶
type LineWorksBot ¶
type LineWorksBot struct {
BotID string
ClientID string
ClientSecret string
ServiceAccount string
PrivateKey []byte
}
func NewLineWorksBot ¶
func NewLineWorksBot(botID, clientID, clientSecret, serviceAccount string, privateKey []byte) *LineWorksBot
func (*LineWorksBot) GenerateAccessToken ¶
func (bot *LineWorksBot) GenerateAccessToken() (string, error)
func (*LineWorksBot) SendTextMessage ¶
func (bot *LineWorksBot) SendTextMessage(token, channelID, text string) error
type TextContent ¶
type TextMessage ¶
type TextMessage struct {
Content TextContent `json:"content"`
}
Click to show internal directories.
Click to hide internal directories.