Documentation
¶
Index ¶
- type API
- func (api API) CheckConnection() error
- func (api API) DebugAllStates(w http.ResponseWriter, r *http.Request)
- func (api API) DebugSetPreloaded(w http.ResponseWriter, r *http.Request)
- func (api API) DebugSetRejected(w http.ResponseWriter, r *http.Request)
- func (api API) Pending(w http.ResponseWriter, r *http.Request)
- func (api API) PendingRemoval(w http.ResponseWriter, r *http.Request)
- func (api API) Preloadable(w http.ResponseWriter, r *http.Request)
- func (api API) Removable(w http.ResponseWriter, r *http.Request)
- func (api API) Remove(w http.ResponseWriter, r *http.Request)
- func (api API) Status(w http.ResponseWriter, r *http.Request)
- func (api API) Submit(w http.ResponseWriter, r *http.Request)
- func (api API) Update(w http.ResponseWriter, r *http.Request)
- type DomainSet
- type DomainStateWithBulk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API holds the server API. Use api.New() to construct.
func (API) CheckConnection ¶
CheckConnection tests if we can connect the database.
func (API) DebugAllStates ¶
func (api API) DebugAllStates(w http.ResponseWriter, r *http.Request)
DebugAllStates allows preloading a domain without any checks. This should only be exposed for test servers.
func (API) DebugSetPreloaded ¶
func (api API) DebugSetPreloaded(w http.ResponseWriter, r *http.Request)
DebugSetPreloaded allows preloading a domain without any checks. This should only be exposed for test servers.
func (API) DebugSetRejected ¶
func (api API) DebugSetRejected(w http.ResponseWriter, r *http.Request)
DebugSetRejected allows rejecting a domain without any checks. This should only be exposed for test servers.
func (API) Pending ¶
func (api API) Pending(w http.ResponseWriter, r *http.Request)
Pending returns a list of domains with status "pending".
Example: GET /pending
func (API) PendingRemoval ¶
func (api API) PendingRemoval(w http.ResponseWriter, r *http.Request)
PendingRemoval returns a list of domains with status "pending-removal".
Example: GET /pending-removal
func (API) Preloadable ¶
func (api API) Preloadable(w http.ResponseWriter, r *http.Request)
Preloadable takes a single domain and returns if it is preloadable.
Example: GET /preloadable?domain=garron.net
func (API) Removable ¶
func (api API) Removable(w http.ResponseWriter, r *http.Request)
Removable takes a single domain and returns if it is removable.
Example: GET /removable?domain=garron.net
func (API) Remove ¶
func (api API) Remove(w http.ResponseWriter, r *http.Request)
Remove takes a single domain and attempts to submit it to the removal queue for the HSTS preload list.
Although the method is POST, we currently use a URL parameter so that it's easy to use in the same way as the other domain endpoints.
Example: POST /remove?domain=garron.net
func (API) Status ¶
func (api API) Status(w http.ResponseWriter, r *http.Request)
Status takes a single domain and returns its preload status.
Example: GET /status?domain=garron.net
func (API) Submit ¶
func (api API) Submit(w http.ResponseWriter, r *http.Request)
Submit takes a single domain and attempts to submit it to the pending queue for the HSTS preload list.
Although the method is POST, we currently use a URL parameter so that it's easy to use in the same way as the other domain endpoints.
Example: POST /submit?domain=garron.net
type DomainStateWithBulk ¶
type DomainStateWithBulk struct { *database.DomainState Bulk bool `json:"bulk"` }
DomainStateWithBulk is a DomainState that also includes information about the bulk status of the domain.