Documentation ¶
Index ¶
- type Bonafide
- func (b *Bonafide) DoGeolocationLookup() (string, error)
- func (b *Bonafide) DoLogin(username, password string) (bool, error)
- func (b *Bonafide) FetchAllGateways(transport string) error
- func (b *Bonafide) GetBestGateways(transport string) ([]Gateway, error)
- func (b *Bonafide) GetBestLocation(transport string) (string, error)
- func (b *Bonafide) GetGatewayByIP(ip string) (Gateway, error)
- func (b *Bonafide) GetLocationLabels(transport string) map[string][]string
- func (b *Bonafide) GetLocationQualityMap(transport string) map[string]float64
- func (b *Bonafide) GetOpenvpnArgs() ([]string, error)
- func (b *Bonafide) GetPemCertificate() ([]byte, error)
- func (b *Bonafide) GetSnowflakeCh() chan *snowflake.StatusEvent
- func (b *Bonafide) IsManualLocation() bool
- func (b *Bonafide) IsUDPAvailable() bool
- 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 {
// contains filtered or unexported fields
}
func New ¶
func New() *Bonafide
New Bonafide: Initializes a Bonafide object. By default, no Credentials are passed.
func (*Bonafide) FetchAllGateways ¶
FetchGateways only filters gateways by transport. if "any" is provided it will return all gateways for all transports
func (*Bonafide) GetBestGateways ¶
GetBestGateways filters by transport, and will return the maximum number defined in bonafide.maxGateways, or the maximum by default (3).
func (*Bonafide) GetBestLocation ¶
This function is part of the apiInterface In the v5 implementation, some errors can happen In this case we always return nil as error
func (*Bonafide) GetLocationLabels ¶
func (*Bonafide) GetLocationQualityMap ¶
func (*Bonafide) GetSnowflakeCh ¶
func (b *Bonafide) GetSnowflakeCh() chan *snowflake.StatusEvent
func (*Bonafide) NeedsCredentials ¶
NeedsCredentials signals if we have to ask user for credentials. If false, it can be that we have a cached token
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.
type Load ¶
Load reflects the fullness metric that menshen returns, if available.