Documentation ¶
Index ¶
- Variables
- type AddZoneRecordParams
- type DBTX
- type DeleteZoneRecordByIdParams
- type GetBestLocationResolvedRecordParams
- type GetBestLocationResolvedRecordRow
- type GetZoneRecordByIdParams
- type LookupRecordsForTypeParams
- type LookupRecordsForTypeRow
- type PutZoneRecordByIdParams
- type Queries
- func (q *Queries) AddZone(ctx context.Context, name string) (int64, error)
- func (q *Queries) AddZoneRecord(ctx context.Context, arg AddZoneRecordParams) (int64, error)
- func (q *Queries) DeleteZoneRecordById(ctx context.Context, arg DeleteZoneRecordByIdParams) error
- func (q *Queries) GetAllServiceRecords(ctx context.Context) ([]ServiceRecord, error)
- func (q *Queries) GetAllServices(ctx context.Context) ([]Service, error)
- func (q *Queries) GetBestLocationResolvedRecord(ctx context.Context, arg GetBestLocationResolvedRecordParams) (GetBestLocationResolvedRecordRow, error)
- func (q *Queries) GetOwnedZones(ctx context.Context, name []string) ([]Zone, error)
- func (q *Queries) GetZone(ctx context.Context, name string) (Zone, error)
- func (q *Queries) GetZoneRecordById(ctx context.Context, arg GetZoneRecordByIdParams) (Record, error)
- func (q *Queries) GetZoneRecords(ctx context.Context, name string) ([]Record, error)
- func (q *Queries) GetZones(ctx context.Context) ([]Zone, error)
- func (q *Queries) LookupRecordsForType(ctx context.Context, arg LookupRecordsForTypeParams) ([]LookupRecordsForTypeRow, error)
- func (q *Queries) PutZoneRecordById(ctx context.Context, arg PutZoneRecordByIdParams) error
- func (q *Queries) Tx(ctx context.Context, opts *sql.TxOptions, fn func(db *Queries) error) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Record
- type Service
- type ServiceRecord
- type Zone
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotConvertToTx = errors.New("cannot convert to tx")
Functions ¶
This section is empty.
Types ¶
type AddZoneRecordParams ¶
type GetBestLocationResolvedRecordRow ¶
type GetBestLocationResolvedRecordRow struct { ID int32 `json:"id"` Service int32 `json:"service"` Type string `json:"type"` Value string `json:"value"` Latitude string `json:"latitude"` Longitude string `json:"longitude"` LatDiff float64 `json:"lat_diff"` LongDiff float64 `json:"long_diff"` D1 float64 `json:"d1"` D2 float64 `json:"d2"` D3 float64 `json:"d3"` Distance float64 `json:"distance"` }
type GetZoneRecordByIdParams ¶
type LookupRecordsForTypeRow ¶
type LookupRecordsForTypeRow struct { ID int32 `json:"id"` Zone int32 `json:"zone"` Name string `json:"name"` Type string `json:"type"` Locked bool `json:"locked"` Ttl nulls.UInt32 `json:"ttl"` Value string `json:"value"` ZoneName string `json:"zone_name"` }
func (LookupRecordsForTypeRow) ConvertRecord ¶
func (r LookupRecordsForTypeRow) ConvertRecord() (*models.Record, error)
func (LookupRecordsForTypeRow) IsLocationResolving ¶
func (r LookupRecordsForTypeRow) IsLocationResolving() bool
type PutZoneRecordByIdParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddZoneRecord ¶
func (*Queries) DeleteZoneRecordById ¶
func (q *Queries) DeleteZoneRecordById(ctx context.Context, arg DeleteZoneRecordByIdParams) error
func (*Queries) GetAllServiceRecords ¶
func (q *Queries) GetAllServiceRecords(ctx context.Context) ([]ServiceRecord, error)
func (*Queries) GetAllServices ¶
func (*Queries) GetBestLocationResolvedRecord ¶
func (q *Queries) GetBestLocationResolvedRecord(ctx context.Context, arg GetBestLocationResolvedRecordParams) (GetBestLocationResolvedRecordRow, error)
func (*Queries) GetOwnedZones ¶
func (*Queries) GetZoneRecordById ¶
func (*Queries) GetZoneRecords ¶
func (*Queries) LookupRecordsForType ¶
func (q *Queries) LookupRecordsForType(ctx context.Context, arg LookupRecordsForTypeParams) ([]LookupRecordsForTypeRow, error)
func (*Queries) PutZoneRecordById ¶
func (q *Queries) PutZoneRecordById(ctx context.Context, arg PutZoneRecordByIdParams) error
type Record ¶
type Record struct { ID int32 `json:"id"` Zone int32 `json:"zone"` Name string `json:"name"` Type string `json:"type"` Locked bool `json:"locked"` Ttl nulls.UInt32 `json:"ttl"` Value string `json:"value"` }
func (Record) IsLocationResolving ¶
type ServiceRecord ¶
Click to show internal directories.
Click to hide internal directories.