Documentation ¶
Index ¶
- Constants
- func CheckSameOrAllowedOrigin(r *http.Request, validOrigins []url.URL) bool
- func DeviceApplicationStatusesListToMap(deviceApplicationStatuses []models.DeviceApplicationStatus) (map[string]map[string]*models.DeviceApplicationStatus, error)
- func DeviceServiceStatesListToMap(deviceServiceStates []models.DeviceServiceState) (map[string]map[string]map[string]*models.DeviceServiceState, error)
- func EqualASCIIFold(s, t string) bool
- func GetDomainFromEmail(email string) (string, error)
- func GetReleaseByIdentifier(rstore store.Releases, ctx context.Context, ...) (*models.Release, error)
- func JSONConvert(src, target interface{}) error
- func ProxyResponse(w http.ResponseWriter, resp *http.Response)
- func ProxyResponseFromDevice(w http.ResponseWriter, resp *http.Response)
- func ReleasesListToMap(releases []models.Release) (map[string]*models.Release, error)
- func ReplaceAllStringSubmatchFunc(re *regexp.Regexp, str string, repl func([]string) string) string
- func Respond(w http.ResponseWriter, ret interface{})
- func WithReferrer(w http.ResponseWriter, r *http.Request, f func(referrer *url.URL))
- func WithTags(tags []string, items TagItems) []string
- type ResponseWriter
- type TagItems
Constants ¶
View Source
const (
ProxiedFromDeviceHeader = "proxied-from-device"
)
Variables ¶
This section is empty.
Functions ¶
func DeviceApplicationStatusesListToMap ¶
func DeviceApplicationStatusesListToMap(deviceApplicationStatuses []models.DeviceApplicationStatus) (map[string]map[string]*models.DeviceApplicationStatus, error)
map[DeviceID]map[ApplicationID]*Status
func DeviceServiceStatesListToMap ¶
func DeviceServiceStatesListToMap(deviceServiceStates []models.DeviceServiceState) (map[string]map[string]map[string]*models.DeviceServiceState, error)
map[DeviceID]map[ApplicationID]map[Service]*State
func EqualASCIIFold ¶
From https://github.com/gorilla/websocket EqualASCIIFold returns true if s is equal to t with ASCII case folding as defined in RFC 4790.
func GetDomainFromEmail ¶
func GetReleaseByIdentifier ¶
func JSONConvert ¶
func JSONConvert(src, target interface{}) error
func ProxyResponse ¶
func ProxyResponse(w http.ResponseWriter, resp *http.Response)
func ProxyResponseFromDevice ¶
func ProxyResponseFromDevice(w http.ResponseWriter, resp *http.Response)
func ReleasesListToMap ¶
map[ApplicationID]*Release
func ReplaceAllStringSubmatchFunc ¶
Elliot Chance's github gist: https://gist.github.com/elliotchance/d419395aa776d632d897
func Respond ¶
func Respond(w http.ResponseWriter, ret interface{})
func WithReferrer ¶
Types ¶
type ResponseWriter ¶
type ResponseWriter struct { HasWrittenStatus bool Headers http.Header Writer io.Writer Status int }
func (*ResponseWriter) Header ¶
func (w *ResponseWriter) Header() http.Header
func (*ResponseWriter) WriteHeader ¶
func (w *ResponseWriter) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.