Documentation
¶
Index ¶
- type Bonafide
- func (b *Bonafide) DoLogin(username, password string) (bool, error)
- func (b *Bonafide) GetAllGateways(transport string) ([]Gateway, error)
- func (b *Bonafide) GetBestLocation(transport string) string
- func (b *Bonafide) GetGatewayByIP(ip string) (Gateway, error)
- func (b *Bonafide) GetGateways(transport string) ([]Gateway, error)
- func (b *Bonafide) GetOpenvpnArgs() ([]string, error)
- func (b *Bonafide) GetPemCertificate() ([]byte, error)
- func (b *Bonafide) GetPemCertificateNoDNS() ([]byte, error)
- func (b *Bonafide) IsManualLocation() bool
- func (b *Bonafide) IsUDPAvailable() bool
- func (b *Bonafide) ListLocationFullness(transport string) map[string]float64
- func (b *Bonafide) ListLocationLabels(transport string) map[string][]string
- func (b *Bonafide) NeedsCredentials() bool
- func (b *Bonafide) SetAutomaticGateway()
- func (b *Bonafide) SetManualGateway(label string)
- type Gateway
- type Load
- type Location
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bonafide ¶
type Bonafide struct { SnowflakeCh chan *snowflake.StatusEvent // contains filtered or unexported fields }
func New ¶
func New() *Bonafide
New Bonafide: Initializes a Bonafide object. By default, no Credentials are passed.
func (*Bonafide) GetAllGateways ¶
GetAllGateways only filters gateways by transport. if "any" is provided it will return all gateways for all transports
func (*Bonafide) GetBestLocation ¶
func (*Bonafide) GetGateways ¶
GetGateways filters by transport, and will return the maximum number defined in bonafide.maxGateways, or the maximum by default (3).
func (*Bonafide) GetOpenvpnArgs ¶
func (*Bonafide) GetPemCertificate ¶
func (*Bonafide) GetPemCertificateNoDNS ¶
func (*Bonafide) IsManualLocation ¶
func (*Bonafide) IsUDPAvailable ¶
func (*Bonafide) ListLocationFullness ¶
func (*Bonafide) ListLocationLabels ¶
func (*Bonafide) NeedsCredentials ¶
NeedsCredentials signals if we have to ask user for credentials. If false, it can be that we have a cached token
func (*Bonafide) SetAutomaticGateway ¶
func (b *Bonafide) SetAutomaticGateway()
func (*Bonafide) SetManualGateway ¶
type Gateway ¶
type Gateway struct { Host string IPAddress string Location string LocationName string CountryCode string Ports []string Protocols []string Options map[string]string Transport string }
A Gateway is a representation of gateways that is independent of the api version. If a given physical location offers different transports, they will appear as separate gateways, so make sure to filter them.