ionos

package
v0.0.0-...-d7bd2e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

package ionos contains a self-contained ionos of a webhook that passes the cert-manager DNS conformance tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() webhook.Solver

func NewMock

func NewMock(port string) webhook.Solver

Types

type Client

type Client interface {
	GetZoneIdByName(ctx context.Context, name string) (string, error)
	GetZoneById(ctx context.Context, id string) (string, error)
	SetConfig(ctx context.Context, config *Config)
	AddRecord(ctx context.Context, zoneId string, records RecordCreateRequest) error
	GetRecordIdByName(ctx context.Context, zoneId string, recordName string) (string, error)
	GetRecordById(ctx context.Context, zoneId string, recordId string) (string, error)
	DeleteRecord(ctx context.Context, zoneId string, recordId string) error
}

func NewClient

func NewClient() Client

func NewMockClient

func NewMockClient() Client

type Config

type Config struct {
	ApiKey   string
	ZoneName string
	ApiUrl   string
}

type IonosClient

type IonosClient struct {
	// contains filtered or unexported fields
}

func (*IonosClient) AddRecord

func (e *IonosClient) AddRecord(ctx context.Context, zoneId string, records RecordCreateRequest) error

func (*IonosClient) DeleteRecord

func (e *IonosClient) DeleteRecord(ctx context.Context, zoneId string, recordId string) error

func (*IonosClient) GetRecordById

func (e *IonosClient) GetRecordById(ctx context.Context, zoneId string, recordId string) (string, error)

func (*IonosClient) GetRecordIdByName

func (e *IonosClient) GetRecordIdByName(ctx context.Context, zoneId string, recordName string) (string, error)

func (*IonosClient) GetZoneById

func (e *IonosClient) GetZoneById(ctx context.Context, id string) (string, error)

func (*IonosClient) GetZoneIdByName

func (e *IonosClient) GetZoneIdByName(ctx context.Context, name string) (string, error)

func (*IonosClient) SetConfig

func (e *IonosClient) SetConfig(ctx context.Context, config *Config)

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

func (*MockClient) AddRecord

func (e *MockClient) AddRecord(ctx context.Context, zoneId string, records RecordCreateRequest) error

func (*MockClient) DeleteRecord

func (e *MockClient) DeleteRecord(ctx context.Context, zoneId string, recordId string) error

func (*MockClient) GetRecordById

func (e *MockClient) GetRecordById(ctx context.Context, zoneId string, recordId string) (string, error)

func (*MockClient) GetRecordIdByName

func (e *MockClient) GetRecordIdByName(ctx context.Context, zoneId string, recordName string) (string, error)

func (*MockClient) GetZoneById

func (e *MockClient) GetZoneById(ctx context.Context, id string) (string, error)

func (*MockClient) GetZoneIdByName

func (e *MockClient) GetZoneIdByName(ctx context.Context, name string) (string, error)

func (*MockClient) SetConfig

func (e *MockClient) SetConfig(ctx context.Context, config *Config)

type Record

type Record struct {
	Name       string `json:"name"`
	RootName   string `json:"rootName"`
	Type       string `json:"type"`
	Content    string `json:"content"`
	ChangeDate string `json:"changeDate"`
	Ttl        int    `json:"ttl"`
	Disabled   bool   `json:"disabled"`
	Id         string `json:"id"`
}

type RecordCreate

type RecordCreate struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Content  string `json:"content"`
	Ttl      int    `json:"ttl"`
	Prio     int    `json:"prio"`
	Disabled bool   `json:"disabled"`
}

type RecordCreateRequest

type RecordCreateRequest []RecordCreate

type RecordResponse

type RecordResponse struct {
	Name    string   `json:"name"`
	Id      string   `json:"id"`
	Type    string   `json:"type"`
	Records []Record `json:"records"`
}

type Zone

type Zone struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type ZoneResponse

type ZoneResponse []Zone

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL