Documentation
¶
Index ¶
- func ContextValue[T any](ctx context.Context, name string, defaultOnNil T) T
- func MarshallRRRecord(data *DNSRecord, zone string) *libdns.RR
- func NewBufPool() *sync.Pool
- type ApiClient
- type AuthRequest
- type Config
- type ConfigExpirationTime
- type ConfigLabel
- type ConfigNonce
- type ControleMode
- type DNSEntries
- type DNSEntry
- type DNSRecord
- type DebugLevel
- type Domain
- type DomainName
- type ErrorResponse
- type ExpirationTime
- type Link
- type Links
- type Storage
- type Token
- type TokenFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBufPool ¶
Types ¶
type AuthRequest ¶
type AuthRequest struct {
Login string `json:"login"`
Nonce string `json:"nonce"`
Label string `json:"label,omitempty"`
ReadOnly bool `json:"read_only"`
ExpirationTime ExpirationTime `json:"expiration_time"`
GlobalKey bool `json:"global_key"`
}
func NewAuthRequest ¶
func NewAuthRequest(config Config) *AuthRequest
type ConfigExpirationTime ¶
type ConfigExpirationTime interface {
ExpirationTime() ExpirationTime
}
type ConfigLabel ¶
type ConfigLabel interface {
Label() string
}
type ConfigNonce ¶
type ConfigNonce interface {
Nonce() string
}
type ControleMode ¶
type ControleMode uint8
const ( RecordLevelControl ControleMode = iota FullZoneControl )
func (*ControleMode) UnmarshalJSON ¶
func (c *ControleMode) UnmarshalJSON(b []byte) error
type DNSEntries ¶
type DNSEntries struct {
Entries []*DNSRecord `json:"dnsEntries"`
}
type DNSRecord ¶
type DebugLevel ¶
type DebugLevel uint8
const ( DebugLevelNormal DebugLevel = iota DebugLevelDebug )
type ErrorResponse ¶
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type ExpirationTime ¶
type ExpirationTime string
const ( ExpirationTime1Hour ExpirationTime = "1 hour" ExpirationTime2Hour ExpirationTime = "120 minutes" ExpirationTime48Hour ExpirationTime = "48 hours" ExpirationTime1Day ExpirationTime = "1 day" ExpirationTime15Day ExpirationTime = "15 days" ExpirationTime1Week ExpirationTime = "1 week" ExpirationTime4Week ExpirationTime = "4 weeks" )
type Storage ¶
func NewTokenFileStorage ¶
NewTokenFileStorage will use given directory for storing token sessions and try to create when calling this function
storage, err := NewTokenFileStorage(filepath.Join(os.TempDir(), "transip"))
func NewTokenMemoryStorage ¶
func NewTokenMemoryStorage() Storage
Click to show internal directories.
Click to hide internal directories.