Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilenameNoExt ¶
Get a filename (without its extension if it has one) from a URI path. Includes handling filesystem paths (as they are a form of URI).
func MakeMultiPartContentTypeHeaderValue ¶
Given a multipart form boundary, returns the header value for a multipart Content-Type header.
Types ¶
type Emojictl ¶
type Emojictl interface { ListEmojis(context.Context) ([]*Emoji, error) AddEmoji(context.Context, *Emoji) error RemoveEmoji(context.Context, *Emoji) error AliasEmoji(context.Context, string, string) error }
Emojictl descibes an interface to manage emojis.
type HTTPHeader ¶
type HTTPHeader string
HTTPHeader represents an HTTP request or response header key
const ( ContentType HTTPHeader = "Content-Type" ContentDisposition HTTPHeader = "Content-Disposition" )
type HTTPHeaders ¶
type HTTPHeaders struct { ContentDisposition string `header:"Content-Disposition"` ContentType string `header:"Content-Type"` Cookie string `header:"Cookie"` }
All supported HTTP headers in this project
func (HTTPHeaders) ToMapStringSliceString ¶
func (h HTTPHeaders) ToMapStringSliceString() map[string][]string
ToMapStringSliceString is a helper to make HTTPHeaders compatible with stdlib types like http.Header and textproto.MIMEHeader
type HTTPMethod ¶
type HTTPMethod string
HTTPMethod represents an HTTP request method
const ( GET HTTPMethod = "GET" HEAD HTTPMethod = "HEAD" POST HTTPMethod = "POST" PUT HTTPMethod = "PUT" DELETE HTTPMethod = "DELETE" CONNECT HTTPMethod = "CONNECT" OPTIONS HTTPMethod = "OPTIONS" TRACE HTTPMethod = "TRACE" PATCH HTTPMethod = "PATCH" )
type MultipartBody ¶
MultipartBody is a declarative representation of a multipart-encoded HTTP request body
func (MultipartBody) Render ¶
func (m MultipartBody) Render() (string, io.ReadCloser, error)
Render materializes the multipart request body from the supplied map[string]string. It returns the boundary as a string as well as an io.ReadCloser that contains the body bytes.
type SlackEmojictl ¶
type SlackEmojictl struct {
// contains filtered or unexported fields
}
func NewSlackEmojictl ¶
func NewSlackEmojictl(workspace, headerToken, bodyToken string) (*SlackEmojictl, error)
func (*SlackEmojictl) AddEmoji ¶
func (s *SlackEmojictl) AddEmoji(ctx context.Context, e *Emoji) error
func (*SlackEmojictl) AliasEmoji ¶
func (s *SlackEmojictl) AliasEmoji(ctx context.Context, src, dest string) error
func (*SlackEmojictl) ListEmojis ¶
func (s *SlackEmojictl) ListEmojis(ctx context.Context) ([]*Emoji, error)
func (*SlackEmojictl) RemoveEmoji ¶
func (s *SlackEmojictl) RemoveEmoji(ctx context.Context, e *Emoji) error