Documentation
¶
Index ¶
- func DetermineExtension(content []byte) string
- type ChannelCache
- type ChannelCacheEntry
- type Content
- type HTTPNotification
- type InmemoryChannelCache
- type MessageAttribute
- type NowPaste
- func (nwp *NowPaste) CheckBasicAuth(req *http.Request) bool
- func (nwp *NowPaste) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (nwp *NowPaste) SetBasicAuth(user string, pass string)
- func (nwp *NowPaste) SetCache(cache ChannelCache)
- func (nwp *NowPaste) SetJSONAutoFile(b bool)
- func (nwp *NowPaste) SetSearchChannelTypes(types []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineExtension ¶ added in v0.8.0
DetermineExtension determines the file extension from the content type.
Types ¶
type ChannelCache ¶ added in v0.7.0
type ChannelCacheEntry ¶ added in v0.7.0
type Content ¶
type Content struct {
Channel string `json:"channel,omitempty"`
IconEmoji string `json:"icon_emoji,omitempty"`
IconURL string `json:"icon_url,omitempty"`
Username string `json:"username"`
Blocks json.RawMessage `json:"blocks,omitempty"`
Text string `json:"text,omitempty"`
EscapeText bool `json:"escape_text,omitempty"`
CodeBlockText bool `json:"code_block_text,omitempty"`
Attachments []slack.Attachment `json:"attachments,omitempty"`
AsFile bool `json:"as_file,omitempty"`
AsMessage bool `json:"as_message,omitempty"`
Filename string `json:"filename,omitempty"`
Summary string `json:"summary,omitempty"`
// contains filtered or unexported fields
}
type HTTPNotification ¶
type HTTPNotification struct {
Type string `json:"Type"`
MessageId string `json:"MessageId"`
Token string `json:"Token,omitempty"` // Only for subscribe and unsubscribe
TopicArn string `json:"TopicArn"`
Subject string `json:"Subject,omitempty"` // Only for Notification
Message string `json:"Message"`
SubscribeURL string `json:"SubscribeURL,omitempty"` // Only for subscribe and unsubscribe
Timestamp time.Time `json:"Timestamp"`
SignatureVersion string `json:"SignatureVersion"`
Signature string `json:"Signature"`
SigningCertURL string `json:"SigningCertURL"`
UnsubscribeURL string `json:"UnsubscribeURL,omitempty"` // Only for notifications
MessageAttributes map[string]MessageAttribute `json:"MessageAttributes,omitempty"`
}
type InmemoryChannelCache ¶ added in v0.7.0
type InmemoryChannelCache struct {
// contains filtered or unexported fields
}
func NewInmemoryChannelCache ¶ added in v0.7.0
func NewInmemoryChannelCache() *InmemoryChannelCache
func (*InmemoryChannelCache) SetMulti ¶ added in v0.7.0
func (c *InmemoryChannelCache) SetMulti(_ context.Context, entries []ChannelCacheEntry) error
type MessageAttribute ¶ added in v0.5.0
type NowPaste ¶
type NowPaste struct {
// contains filtered or unexported fields
}
func (*NowPaste) CheckBasicAuth ¶ added in v0.3.0
func (*NowPaste) ServeHTTP ¶
func (nwp *NowPaste) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*NowPaste) SetBasicAuth ¶ added in v0.3.0
func (*NowPaste) SetCache ¶ added in v0.8.0
func (nwp *NowPaste) SetCache(cache ChannelCache)
func (*NowPaste) SetJSONAutoFile ¶ added in v0.8.0
func (*NowPaste) SetSearchChannelTypes ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.