Documentation
¶
Index ¶
- func BasicAuth(username string, password string) gin.HandlerFunc
- func ValidateRecordValue(recordType management.RecordType, value json.RawMessage) error
- type AAAARecord
- type API
- func (a *API) CreateRecord(c *gin.Context)
- func (a *API) CreateZone(c *gin.Context)
- func (a *API) DeleteRecord(c *gin.Context)
- func (a *API) DeleteZone(c *gin.Context)
- func (a *API) Record(c *gin.Context)
- func (a *API) Records(c *gin.Context)
- func (a *API) UpdateRecord(c *gin.Context)
- func (a *API) Zone(c *gin.Context)
- func (a *API) Zones(c *gin.Context)
- type ARecord
- type CNAMERecord
- type CreateRecordRequestBody
- type CreateRecordRequestURI
- type CreateRecordResponse
- type CreateZoneRequest
- type CreateZoneResponse
- type DeleteRecordRequest
- type DeleteRecordResponse
- type DeleteZoneRequest
- type DeleteZoneResponse
- type HTTP
- type MXRecord
- type NSRecord
- type PTRRecord
- type RecordRequest
- type RecordResponse
- type RecordsRequest
- type RecordsResponse
- type TXTRecord
- type UpdateRecordRequestBody
- type UpdateRecordRequestURI
- type UpdateRecordResponse
- type ZoneRequest
- type ZoneResponse
- type ZonesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRecordValue ¶
func ValidateRecordValue(recordType management.RecordType, value json.RawMessage) error
Types ¶
type AAAARecord ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(service *management.ManagementService) *API
func (*API) CreateRecord ¶
func (*API) CreateZone ¶
func (*API) DeleteRecord ¶
func (*API) DeleteZone ¶
func (*API) UpdateRecord ¶
type CNAMERecord ¶
type CNAMERecord struct {
Target string `json:"target"`
}
type CreateRecordRequestBody ¶
type CreateRecordRequestBody struct { Name string `json:"name" binding:"required" validate:"ascii,min=1,max=255"` Type management.RecordType `json:"type" binding:"required"` TTL uint32 `json:"ttl" binding:"required"` Value json.RawMessage `json:"value" binding:"required"` }
type CreateRecordRequestURI ¶
type CreateRecordRequestURI struct {
ZoneID string `uri:"zone_id" binding:"required" validate:"uuid4"`
}
type CreateRecordResponse ¶
type CreateRecordResponse struct { Error string `json:"error,omitempty"` Record *management.Record `json:"record,omitempty"` }
type CreateZoneRequest ¶
type CreateZoneRequest struct {
Zone string `json:"zone" binding:"required" validate:"hostname"`
}
type CreateZoneResponse ¶
type CreateZoneResponse struct { Error string `json:"error,omitempty"` Zone *management.Zone `json:"zone,omitempty"` }
type DeleteRecordRequest ¶
type DeleteRecordResponse ¶
type DeleteRecordResponse struct {
Error string `json:"error"`
}
type DeleteZoneRequest ¶
type DeleteZoneRequest struct {
ZoneID string `uri:"zone_id" binding:"required" validate:"uuid4"`
}
type DeleteZoneResponse ¶
type DeleteZoneResponse struct {
Error string `json:"error,omitempty"`
}
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func (*HTTP) RegisterRoutes ¶
func (h *HTTP) RegisterRoutes()
type RecordRequest ¶
type RecordResponse ¶
type RecordResponse struct { Error string `json:"error,omitempty"` Record *management.Record `json:"record,omitempty"` }
type RecordsRequest ¶
type RecordsRequest struct {
ZoneID string `uri:"zone_id" binding:"required" validate:"uuid4"`
}
type RecordsResponse ¶
type RecordsResponse struct { Error string `json:"error,omitempty"` Records []management.Record `json:"records,omitempty"` }
type UpdateRecordRequestBody ¶
type UpdateRecordRequestBody struct { Name string `json:"name" binding:"required" validate:"ascii,min=1,max=255"` Type management.RecordType `json:"type" binding:"required"` TTL uint32 `json:"ttl" binding:"required"` Value json.RawMessage `json:"value" binding:"required"` }
type UpdateRecordRequestURI ¶
type UpdateRecordResponse ¶
type UpdateRecordResponse struct { Error string `json:"error,omitempty"` Record *management.Record `json:"record,omitempty"` }
type ZoneRequest ¶
type ZoneRequest struct {
ZoneID string `uri:"zone_id" binding:"required" validate:"uuid4"`
}
type ZoneResponse ¶
type ZoneResponse struct { Error string `json:"error,omitempty"` Zone *management.Zone `json:"zone,omitempty"` }
type ZonesResponse ¶
type ZonesResponse struct { Error string `json:"error,omitempty"` Zones []management.Zone `json:"data,omitempty"` }
Click to show internal directories.
Click to hide internal directories.