2024-05-08 09:50:45 +00:00
|
|
|
// Package common contains common constant strings constantly used in other
|
|
|
|
// packages.
|
|
|
|
//
|
|
|
|
// DO NOT import or provide anythyng except constants here.
|
2021-09-20 15:45:54 +00:00
|
|
|
package common
|
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
const charsetUTF8 string = "charset=UTF-8"
|
2023-07-06 23:11:53 +00:00
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// Content types of the HTTP request and response body.
|
2021-09-20 15:45:54 +00:00
|
|
|
const (
|
2021-11-14 21:08:21 +00:00
|
|
|
MIMEApplicationForm string = "application/x-www-form-urlencoded"
|
|
|
|
MIMEApplicationJSON string = "application/json"
|
|
|
|
MIMEApplicationJSONCharsetUTF8 string = MIMEApplicationJSON + "; " + charsetUTF8
|
|
|
|
MIMETextHTML string = "text/html"
|
|
|
|
MIMETextHTMLCharsetUTF8 string = MIMETextHTML + "; " + charsetUTF8
|
|
|
|
MIMETextPlain string = "text/plain"
|
|
|
|
MIMETextPlainCharsetUTF8 string = MIMETextPlain + "; " + charsetUTF8
|
2021-09-20 15:45:54 +00:00
|
|
|
)
|
2022-07-28 18:07:37 +00:00
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// HTTP header names.
|
2023-01-02 00:11:17 +00:00
|
|
|
const (
|
2023-01-11 14:46:46 +00:00
|
|
|
HeaderAccept string = "Accept"
|
|
|
|
HeaderAcceptLanguage string = "Accept-Language"
|
|
|
|
HeaderAccessControlAllowOrigin string = "Access-Control-Allow-Origin"
|
|
|
|
HeaderAuthorization string = "Authorization"
|
|
|
|
HeaderContentType string = "Content-Type"
|
|
|
|
HeaderCookie string = "Cookie"
|
|
|
|
HeaderHost string = "Host"
|
|
|
|
HeaderLink string = "Link"
|
|
|
|
HeaderLocation string = "Location"
|
|
|
|
HeaderVary string = "Vary"
|
|
|
|
HeaderWWWAuthenticate string = "WWW-Authenticate"
|
|
|
|
HeaderXCSRFToken string = "X-CSRF-Token"
|
2023-01-02 00:11:17 +00:00
|
|
|
)
|
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// Searching class names.
|
2023-08-07 03:07:55 +00:00
|
|
|
const (
|
|
|
|
HApp string = "h-app"
|
|
|
|
HCard string = "h-card"
|
|
|
|
HXApp string = "h-x-app"
|
|
|
|
)
|
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// Searching property names.
|
2023-08-07 03:07:55 +00:00
|
|
|
const (
|
|
|
|
PropertyEmail string = "email"
|
|
|
|
PropertyLogo string = "logo"
|
|
|
|
PropertyName string = "name"
|
|
|
|
PropertyPhoto string = "photo"
|
|
|
|
PropertyURL string = "url"
|
|
|
|
)
|
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// Expected 'rel' attribute values.
|
2023-08-07 03:07:55 +00:00
|
|
|
const (
|
|
|
|
RelAuthn string = "authn"
|
|
|
|
RelAuthorizationEndpoint string = "authorization_endpoint"
|
|
|
|
RelIndieAuthMetadata string = "indieauth-metadata"
|
|
|
|
RelMicropub string = "micropub"
|
|
|
|
RelMicrosub string = "microsub"
|
|
|
|
RelRedirectURI string = "redirect_uri"
|
|
|
|
RelTicketEndpoint string = "ticket_endpoint"
|
|
|
|
RelTokenEndpoint string = "token_endpoint"
|
|
|
|
)
|
|
|
|
|
2024-05-08 09:50:45 +00:00
|
|
|
// Und used as String method output of custom types.
|
2022-07-28 18:07:37 +00:00
|
|
|
const Und string = "und"
|