Documentation ¶
Index ¶
- func ValidateKey(key string) bool
- func ValidateKeyPath(key string) bool
- type Handler
- func (h *Handler) AuthInit(e *echo.Echo)
- func (h *Handler) CreateUrl(c echo.Context) error
- func (h *Handler) GetURL(c echo.Context) error
- func (h *Handler) IPRestrict(next echo.HandlerFunc) echo.HandlerFunc
- func (h *Handler) Opensearch(c echo.Context) error
- func (h *Handler) Popular(c echo.Context) error
- func (h *Handler) Search(c echo.Context) error
- func (h *Handler) SearchSuggestions(c echo.Context) error
- func (h *Handler) SlackCommand(c echo.Context) error
- func (h *Handler) UpdateUrl(c echo.Context) error
- func (h *Handler) Url(c echo.Context) (err error)
- type SlackAttachment
- type SlackPayload
- type SlackResponse
- type SlackSecretsVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateKey ¶ added in v0.1.0
ValidateKey validates a key against the required format
func ValidateKeyPath ¶ added in v1.1.0
ValidateKeyPath validates a key with optional parameters
Types ¶
type Handler ¶
type Handler struct{}
Handler ...
func (*Handler) IPRestrict ¶ added in v0.2.0
func (h *Handler) IPRestrict(next echo.HandlerFunc) echo.HandlerFunc
IPRestrict middleware will allow whitelisted ips through and handle auth
func (*Handler) Opensearch ¶ added in v0.1.0
Opensearch renders opensearch.xml page to tell the browser where to access search urls
func (*Handler) SearchSuggestions ¶
SearchSuggestions returns suggestions in the opensearch expected format This allows browsers to auto suggest results from the url bar Format ["searchterm", [array of suggestoins]]
func (*Handler) SlackCommand ¶ added in v0.1.0
SlackCommand responds to slack go command
type SlackAttachment ¶ added in v0.1.0
type SlackPayload ¶ added in v0.1.0
type SlackPayload struct { Token string `form:"token"` TeamID string `form:"team_id"` TeamDomain string `form:"team_domain"` EnterpriseID string `form:"enterprise_id"` EnterpriseName string `form:"enterprise_name"` ChannelID string `form:"channel_id"` ChannelName string `form:"channel_name"` UserID string `form:"user_id"` UserName string `form:"user_name"` Command string `form:"command"` Text string `form:"text"` ResponseURL string `form:"response_url"` TriggerID string `form:"trigger_id"` }
SlackPayload received from slack
type SlackResponse ¶ added in v0.1.0
type SlackResponse struct { ResponseType string `json:"response_type"` Text string `json:"text"` Attachments []SlackAttachment `json:"attachments"` Parse string `json:"parse"` }
type SlackSecretsVerifier ¶ added in v0.1.0
type SlackSecretsVerifier struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.