Documentation ¶
Index ¶
- Constants
- Variables
- func AuthCallback(ctx *gin.Context)
- func AuthLogin(ctx *gin.Context)
- func AuthLogout(ctx *gin.Context)
- func AuthSetup(callbackURL string)
- type APIError
- type ChangeServerTypeRequest
- type Config
- type Control
- func (control *Control) Authorize() gin.HandlerFunc
- func (control *Control) ChangeServerType(ctx *gin.Context)
- func (control *Control) ExtendServer(ctx *gin.Context)
- func (control *Control) ListServers(ctx *gin.Context)
- func (control *Control) NewServer(ctx *gin.Context)
- func (control *Control) RebootServer(ctx *gin.Context)
- func (control *Control) Run() error
- func (control *Control) StartServer(ctx *gin.Context)
- func (control *Control) TerminateServer(ctx *gin.Context)
- type CreateDNSRecordRequest
- type CreateDNSRecordResponse
- type CreateNewServerRequest
- type ExtendServerRequest
- type StartServerRequest
Constants ¶
View Source
const ( LabelManagedBy = "mnbr.eu/managed-by" LabelValueMangedByControl = "mnbcontrol" LabelService = "mnbr.eu/svc" LabelTTL = "mnbr.eu/ttl" LabelActiveBlueprint = "mnbr.eu/active-blueprint" LabelDNSARecordID = "mnbr.eu/dns-a-record-id" LabelDNSAAAARecordID = "mnbr.eu/dns-aaaa-record-id" LabelServerType = "mnbr.eu/server-type" )
View Source
const (
DNSEndpoint = "https://dns.hetzner.com/api/v1"
)
Variables ¶
View Source
var ( ErrIllegalArguments = errors.New("illegal arguments") )
View Source
var (
MaxTTL = 24 * time.Hour
)
Functions ¶
func AuthCallback ¶
func AuthLogout ¶
Types ¶
type ChangeServerTypeRequest ¶
type Control ¶
type Control struct { Config *Config // contains filtered or unexported fields }
func (*Control) Authorize ¶
func (control *Control) Authorize() gin.HandlerFunc
func (*Control) ChangeServerType ¶
func (*Control) ExtendServer ¶
func (*Control) ListServers ¶
func (*Control) RebootServer ¶
func (*Control) StartServer ¶
func (*Control) TerminateServer ¶
type CreateDNSRecordRequest ¶
type CreateDNSRecordResponse ¶
type CreateDNSRecordResponse struct { Record struct { ID string `json:"id"` } `json:"record"` }
type CreateNewServerRequest ¶
type ExtendServerRequest ¶
type StartServerRequest ¶
Click to show internal directories.
Click to hide internal directories.