Documentation ¶
Index ¶
- func NewHandler(activestorage ActiveStorage) http.Handler
- type ActiveStorage
- type StubBackend
- func (b StubBackend) CreateRecord(context.Context, ns.RecordInput) (*ns.Record, error)
- func (b StubBackend) CreateZone(context.Context, ns.ZoneInput) (*ns.Zone, error)
- func (b StubBackend) QueryRecords(context.Context) ([]ns.Record, error)
- func (b StubBackend) QueryZones(context.Context) ([]ns.Zone, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(activestorage ActiveStorage) http.Handler
Types ¶
type ActiveStorage ¶
type ActiveStorage interface { CreateZone(ctx context.Context, input ns.ZoneInput) (*ns.Zone, error) QueryZone(ctx context.Context, input struct{ Name string }) (*ns.Zone, error) QueryZones(ctx context.Context) ([]ns.Zone, error) CreateRecord(ctx context.Context, input ns.RecordInput) (*ns.Record, error) QueryRecord(ctx context.Context, input struct { ZoneName string ID uint64 }) (*ns.Record, error) QueryRecords(ctx context.Context, input struct { ZoneName string }) ([]ns.Record, error) // OpenReadTransaction creates a new read-only transaction to execute the // provided operation. // // This method is executed before all query operations to make the result // consistent. For backends without transactional support, consider simply // calling a specified operation. OpenReadTransaction(ctx context.Context, op func(context.Context) error) error // OpenWriteTransaction creates a read/write tansaction to execute the // provided operation. // // This method is executed before all mutating operations. OpenWriteTransaction(ctx context.Context, op func(context.Context) error) error // Close closes a storage. Close(context.Context) error }
type StubBackend ¶
type StubBackend struct{}
func (StubBackend) CreateRecord ¶
func (b StubBackend) CreateRecord(context.Context, ns.RecordInput) (*ns.Record, error)
func (StubBackend) CreateZone ¶
func (StubBackend) QueryRecords ¶
func (StubBackend) QueryZones ¶
Click to show internal directories.
Click to hide internal directories.