Documentation ¶
Index ¶
- func DownloadFile(ctx context.Context, url string, logger *log.Logger) (io.ReadCloser, error)
- func OAuthInit(ctx context.Context, endpoint, userTokenName string, scopes []string, ...) (string, error)
- type AkkomaConfig
- type AkkomaDB
- type AkkomaEntry
- type AkkomaUpdates
- type Client
- type GTS
- type Plan
- type ServerEntry
- type Stringable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile fetches the specified URL and returns the body wrapped in a limiter
Types ¶
type AkkomaConfig ¶
type AkkomaConfig struct { Configs []AkkomaEntry `json:"configs"` NeedReboot bool `json:"need_reboot"` }
type AkkomaDB ¶
type AkkomaDB struct {
// contains filtered or unexported fields
}
func (*AkkomaDB) List ¶
func (g *AkkomaDB) List(ctx context.Context) ([]ServerEntry, Stringable, error)
List fetches the list of allowed domains from the server
type AkkomaEntry ¶
type AkkomaUpdates ¶
type AkkomaUpdates struct {
Configs []AkkomaEntry `json:"configs"`
}
func (*AkkomaUpdates) String ¶
func (u *AkkomaUpdates) String() string
type Client ¶
type Client interface { // Connect confirms that we are able to access the instance Connect(ctx context.Context) error // List fetches the list of allowed domains from the server List(ctx context.Context) ([]ServerEntry, Stringable, error) // Update applies the provided Plan of allowlist changes to the server Update(ctx context.Context, plan Plan, fromList Stringable) error }
type GTS ¶
type GTS struct {
// contains filtered or unexported fields
}
func (*GTS) List ¶
func (g *GTS) List(ctx context.Context) ([]ServerEntry, Stringable, error)
List fetches the list of allowed domains from the server
type Plan ¶
type Plan struct { // ToAdd contains new allowlist entries to be added at the server ToAdd []data.Domain // ToRemove contains old allowlist entries to be removed from the server ToRemove []ServerEntry // NoChange contains current allowlist entries which already exist at the server NoChange []data.Domain }
type ServerEntry ¶
type Stringable ¶
type Stringable interface {
String() string
}
Click to show internal directories.
Click to hide internal directories.