Documentation ¶
Index ¶
- Constants
- type Auth
- type Catalog
- type Client
- func (c *Client) CreateRecordSet(ctx context.Context, zoneID string, record RecordSets) error
- func (c *Client) DeleteRecordSet(ctx context.Context, zoneID, recordID string) error
- func (c *Client) GetRecordSetID(ctx context.Context, zoneID, fqdn string) (string, error)
- func (c *Client) GetZoneID(ctx context.Context, zone string) (string, error)
- func (c *Client) Login(ctx context.Context) error
- type DNSServerMock
- func (m *DNSServerMock) GetServerURL() string
- func (m *DNSServerMock) HandleAuthSuccessfully()
- func (m *DNSServerMock) HandleDeleteRecordsetsSuccessfully()
- func (m *DNSServerMock) HandleListRecordsetsEmpty()
- func (m *DNSServerMock) HandleListRecordsetsSuccessfully()
- func (m *DNSServerMock) HandleListZonesEmpty()
- func (m *DNSServerMock) HandleListZonesSuccessfully()
- func (m *DNSServerMock) ShutdownServer()
- type Domain
- type Endpoint
- type Identity
- type Links
- type LoginRequest
- type Metadata
- type Password
- type Project
- type RecordSets
- type RecordSetsResponse
- type Role
- type Scope
- type Token
- type TokenResponse
- type User
- type UserR
- type Zone
- type ZonesResponse
Constants ¶
const DefaultIdentityEndpoint = "https://iam.eu-de.otc.t-systems.com:443/v3/auth/tokens"
DefaultIdentityEndpoint the default API identity endpoint.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { IdentityEndpoint string HTTPClient *http.Client // contains filtered or unexported fields }
func (*Client) CreateRecordSet ¶
CreateRecordSet creates a record. https://docs.otc.t-systems.com/domain-name-service/api-ref/apis/record_set_management/creating_a_record_set.html
func (*Client) DeleteRecordSet ¶
DeleteRecordSet delete a record set. https://docs.otc.t-systems.com/domain-name-service/api-ref/apis/record_set_management/deleting_a_record_set.html
func (*Client) GetRecordSetID ¶
type DNSServerMock ¶
type DNSServerMock struct {
// contains filtered or unexported fields
}
DNSServerMock mock.
func NewDNSServerMock ¶
func NewDNSServerMock(t *testing.T) *DNSServerMock
NewDNSServerMock create a new DNSServerMock.
func (*DNSServerMock) GetServerURL ¶
func (m *DNSServerMock) GetServerURL() string
func (*DNSServerMock) HandleAuthSuccessfully ¶
func (m *DNSServerMock) HandleAuthSuccessfully()
HandleAuthSuccessfully Handle auth successfully.
func (*DNSServerMock) HandleDeleteRecordsetsSuccessfully ¶
func (m *DNSServerMock) HandleDeleteRecordsetsSuccessfully()
HandleDeleteRecordsetsSuccessfully Handle delete recordsets successfully.
func (*DNSServerMock) HandleListRecordsetsEmpty ¶
func (m *DNSServerMock) HandleListRecordsetsEmpty()
HandleListRecordsetsEmpty Handle list recordsets empty.
func (*DNSServerMock) HandleListRecordsetsSuccessfully ¶
func (m *DNSServerMock) HandleListRecordsetsSuccessfully()
HandleListRecordsetsSuccessfully Handle list recordsets successfully.
func (*DNSServerMock) HandleListZonesEmpty ¶
func (m *DNSServerMock) HandleListZonesEmpty()
HandleListZonesEmpty Handle list zones empty.
func (*DNSServerMock) HandleListZonesSuccessfully ¶
func (m *DNSServerMock) HandleListZonesSuccessfully()
HandleListZonesSuccessfully Handle list zones successfully.
func (*DNSServerMock) ShutdownServer ¶
func (m *DNSServerMock) ShutdownServer()
ShutdownServer creates the mock server.
type LoginRequest ¶
type LoginRequest struct {
Auth Auth `json:"auth"`
}
type RecordSets ¶
type RecordSets struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` TTL int `json:"ttl,omitempty"` Records []string `json:"records,omitempty"` Status string `json:"status,omitempty"` Links *Links `json:"links,omitempty"` ZoneID string `json:"zone_id,omitempty"` ZoneName string `json:"zone_name,omitempty"` CreateAt string `json:"create_at,omitempty"` UpdateAt string `json:"update_at,omitempty"` Default bool `json:"default,omitempty"` ProjectID string `json:"project_id,omitempty"` }
type RecordSetsResponse ¶
type RecordSetsResponse struct { Links Links `json:"links"` RecordSets []RecordSets `json:"recordsets"` Metadata Metadata `json:"metadata"` }
type Token ¶
type Token struct { User UserR `json:"user,omitempty"` Domain Domain `json:"domain,omitempty"` Catalog []Catalog `json:"catalog,omitempty"` Methods []string `json:"methods,omitempty"` Roles []Role `json:"roles,omitempty"` ExpiresAt string `json:"expires_at,omitempty"` IssuedAt string `json:"issued_at,omitempty"` }
type TokenResponse ¶
type TokenResponse struct {
Token Token `json:"token"`
}
type Zone ¶
type Zone struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Email string `json:"email,omitempty"` TTL int `json:"ttl,omitempty"` Serial int `json:"serial,omitempty"` Status string `json:"status,omitempty"` Links *Links `json:"links,omitempty"` PoolID string `json:"pool_id,omitempty"` ProjectID string `json:"project_id,omitempty"` ZoneType string `json:"zone_type,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` RecordNum int `json:"record_num,omitempty"` }