Documentation ¶
Index ¶
- Variables
- func ERROR(w http.ResponseWriter, statusCode int, err error)
- func JSON(w http.ResponseWriter, statusCode int, data interface{})
- func MockFS() *mockFS
- type API
- func (api *API) GetCloudflareSubnets(w http.ResponseWriter, r *http.Request)
- func (api *API) GetRules(w http.ResponseWriter, r *http.Request)
- func (api *API) Run()
- func (api *API) UserCreateAgent(w http.ResponseWriter, r *http.Request)
- func (api *API) UserDeleteAgent(w http.ResponseWriter, r *http.Request)
- func (api *API) UserGetAgent(w http.ResponseWriter, r *http.Request)
- func (api *API) UserGetAgents(w http.ResponseWriter, r *http.Request)
- func (api *API) UserLogin(w http.ResponseWriter, r *http.Request)
- func (api *API) UserRegister(w http.ResponseWriter, r *http.Request)
- func (api *API) UserSecondStep(w http.ResponseWriter, r *http.Request)
- func (api *API) UserUpdate(w http.ResponseWriter, r *http.Request)
- func (api *API) UserUpdateAgent(w http.ResponseWriter, r *http.Request)
- func (api *API) UserVerify(w http.ResponseWriter, r *http.Request)
- type AgentCreationRequest
- type AgentUpdateRequest
- type Config
- type EmailConfig
- type Step2Request
- type UserLoginRequest
- type UserRegisterRequest
- type UserResponse
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenClaims = errors.New("can't extract claims from jwt token") ErrTokenInvalid = errors.New("jwt token not valid") ErrTokenExpired = errors.New("jwt token expired") ErrTokenIncomplete = errors.New("jwt token is missing required fields") ErrToken2FA = errors.New("requires 2fa step") )
View Source
var ( ErrEmpty = errors.New("") ErrMessageNotFound = errors.New("record not found") )
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, statusCode int, data interface{})
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) GetCloudflareSubnets ¶ added in v1.2.0
func (api *API) GetCloudflareSubnets(w http.ResponseWriter, r *http.Request)
func (*API) UserCreateAgent ¶
func (api *API) UserCreateAgent(w http.ResponseWriter, r *http.Request)
func (*API) UserDeleteAgent ¶
func (api *API) UserDeleteAgent(w http.ResponseWriter, r *http.Request)
func (*API) UserGetAgent ¶
func (api *API) UserGetAgent(w http.ResponseWriter, r *http.Request)
func (*API) UserGetAgents ¶
func (api *API) UserGetAgents(w http.ResponseWriter, r *http.Request)
func (*API) UserRegister ¶
func (api *API) UserRegister(w http.ResponseWriter, r *http.Request)
func (*API) UserSecondStep ¶
func (api *API) UserSecondStep(w http.ResponseWriter, r *http.Request)
func (*API) UserUpdate ¶
func (api *API) UserUpdate(w http.ResponseWriter, r *http.Request)
func (*API) UserUpdateAgent ¶
func (api *API) UserUpdateAgent(w http.ResponseWriter, r *http.Request)
func (*API) UserVerify ¶
func (api *API) UserVerify(w http.ResponseWriter, r *http.Request)
type AgentCreationRequest ¶
type AgentUpdateRequest ¶
type Config ¶
type Config struct { URL string `yaml:"url"` SSL bool `yaml:"ssl"` CertsCache string `yaml:"certs_cache"` Domains []string `yaml:"domains"` Address string `yaml:"address"` ReqMaxSize int64 `yaml:"req_max_size"` TokenTTL int `yaml:"token_ttl"` Secret string `yaml:"secret"` MaxAgents int `yaml:"max_agents_per_user"` CacheTTL int `yaml:"cache_ttl"` AllowNewUsers bool `yaml:"allow_new_users"` }
type EmailConfig ¶
type Step2Request ¶
type Step2Request struct {
Code string `json:"code"`
}
type UserLoginRequest ¶
type UserRegisterRequest ¶
type UserResponse ¶
type UserUpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.