Documentation
¶
Index ¶
- func ParseZone(msg *happydns.ZoneMessage) (*happydns.Zone, error)
- type CreateZoneUsecase
- type DeleteZoneUsecase
- type GetZoneUsecase
- type ListRecordsUsecase
- type Service
- func (s *Service) CreateZone(zone *happydns.Zone) error
- func (s *Service) DeleteZone(zoneid happydns.Identifier) error
- func (s *Service) DiffZones(domain *happydns.Domain, newZone *happydns.Zone, oldZoneID happydns.Identifier) ([]*happydns.Correction, error)
- func (s *Service) FlattenZoneFile(domain *happydns.Domain, zone *happydns.Zone) (string, error)
- func (s *Service) GenerateRecords(domain *happydns.Domain, zone *happydns.Zone) ([]happydns.Record, error)
- func (s *Service) GetZone(zoneid happydns.Identifier) (*happydns.Zone, error)
- func (s *Service) GetZoneMeta(zoneid happydns.Identifier) (*happydns.ZoneMeta, error)
- func (s *Service) LoadZoneFromId(domain *happydns.Domain, id happydns.Identifier) (*happydns.Zone, error)
- func (s *Service) UpdateZone(zoneID happydns.Identifier, updateFn func(*happydns.Zone)) error
- type UpdateZoneUsecase
- type ZoneDifferUsecase
- type ZoneStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateZoneUsecase ¶
type CreateZoneUsecase struct {
// contains filtered or unexported fields
}
func NewCreateZoneUsecase ¶
func NewCreateZoneUsecase(store ZoneStorage) *CreateZoneUsecase
func (*CreateZoneUsecase) Create ¶
func (uc *CreateZoneUsecase) Create(zone *happydns.Zone) error
type DeleteZoneUsecase ¶
type DeleteZoneUsecase struct {
// contains filtered or unexported fields
}
func NewDeleteZoneUsecase ¶
func NewDeleteZoneUsecase(store ZoneStorage) *DeleteZoneUsecase
func (*DeleteZoneUsecase) Delete ¶
func (uc *DeleteZoneUsecase) Delete(zoneID happydns.Identifier) error
type GetZoneUsecase ¶
type GetZoneUsecase struct {
// contains filtered or unexported fields
}
func NewGetZoneUsecase ¶
func NewGetZoneUsecase(store ZoneStorage) *GetZoneUsecase
func (*GetZoneUsecase) Get ¶
func (uc *GetZoneUsecase) Get(zoneID happydns.Identifier) (*happydns.Zone, error)
func (*GetZoneUsecase) GetInDomain ¶
func (uc *GetZoneUsecase) GetInDomain(zoneID happydns.Identifier, domain *happydns.Domain) (*happydns.Zone, error)
func (*GetZoneUsecase) GetMeta ¶
func (uc *GetZoneUsecase) GetMeta(zoneID happydns.Identifier) (*happydns.ZoneMeta, error)
type ListRecordsUsecase ¶
type ListRecordsUsecase struct {
// contains filtered or unexported fields
}
func NewListRecordsUsecase ¶
func NewListRecordsUsecase(serviceListRecordsUC *service.ListRecordsUsecase) *ListRecordsUsecase
func (*ListRecordsUsecase) List ¶
func (uc *ListRecordsUsecase) List(domain *happydns.Domain, zone *happydns.Zone) (rrs []happydns.Record, err error)
func (*ListRecordsUsecase) ToZoneFile ¶
func (uc *ListRecordsUsecase) ToZoneFile(domain *happydns.Domain, zone *happydns.Zone) (string, error)
type Service ¶
type Service struct { CreateZoneUC *CreateZoneUsecase DeleteZoneUC *DeleteZoneUsecase DiffZoneUC *ZoneDifferUsecase GetZoneUC *GetZoneUsecase ListRecordsUC *ListRecordsUsecase UpdateZoneUC *UpdateZoneUsecase }
func NewZoneUsecases ¶
func NewZoneUsecases(store ZoneStorage, serviceUC *service.Service) *Service
func (*Service) DiffZones ¶
func (*Service) FlattenZoneFile ¶
func (*Service) GenerateRecords ¶
func (*Service) GetZone ¶
func (*Service) GetZoneMeta ¶
func (*Service) LoadZoneFromId ¶
type UpdateZoneUsecase ¶
type UpdateZoneUsecase struct {
// contains filtered or unexported fields
}
func NewUpdateZoneUsease ¶
func NewUpdateZoneUsease(store ZoneStorage, getZone *GetZoneUsecase) *UpdateZoneUsecase
func (*UpdateZoneUsecase) Update ¶
func (uc *UpdateZoneUsecase) Update(zoneID happydns.Identifier, updateFn func(*happydns.Zone)) error
type ZoneDifferUsecase ¶
type ZoneDifferUsecase struct {
// contains filtered or unexported fields
}
func NewZoneDifferUsecase ¶
func NewZoneDifferUsecase(getZone *GetZoneUsecase, listRecords *ListRecordsUsecase) *ZoneDifferUsecase
func (*ZoneDifferUsecase) Diff ¶
func (uc *ZoneDifferUsecase) Diff(domain *happydns.Domain, newzone *happydns.Zone, oldzoneid happydns.Identifier) ([]*happydns.Correction, error)
type ZoneStorage ¶
type ZoneStorage interface { // ListAllZones retrieves the list of known Zones. ListAllZones() (happydns.Iterator[happydns.ZoneMessage], error) // GetZoneMeta retrieves metadatas of the Zone with the given identifier. GetZoneMeta(zoneid happydns.Identifier) (*happydns.ZoneMeta, error) // GetZone retrieves the full Zone (including Services and metadatas) which have the given identifier. GetZone(zoneid happydns.Identifier) (*happydns.ZoneMessage, error) // CreateZone creates a record in the database for the given Zone. CreateZone(zone *happydns.Zone) error // UpdateZone updates the fields of the given Zone. UpdateZone(zone *happydns.Zone) error // DeleteZone removes the given Zone from the database. DeleteZone(zoneid happydns.Identifier) error // ClearZones deletes all Zones present in the database. ClearZones() error }
Source Files
¶
- create_zone.go
- delete_zone.go
- factory.go
- get_zone.go
- list_records.go
- parse_zone.go
- update_zone.go
- zone_differ.go
- zone_storage.go
Click to show internal directories.
Click to hide internal directories.