Documentation
¶
Index ¶
- Constants
- Variables
- type TelemetryAuth
- type TelemetryClient
- func (tc *TelemetryClient) AuthAccessible() bool
- func (tc *TelemetryClient) AuthExpiration() (expiration time.Time, err error)
- func (tc *TelemetryClient) AuthIssuer() (issuer string, err error)
- func (tc *TelemetryClient) AuthPath() string
- func (tc *TelemetryClient) Authenticate() (err error)
- func (tc *TelemetryClient) ClientId() string
- func (tc *TelemetryClient) CreateBundles(tags types.Tags) error
- func (tc *TelemetryClient) CreateReports(tags types.Tags) (err error)
- func (tc *TelemetryClient) Generate(telemetry types.TelemetryType, content *types.TelemetryBlob, tags types.Tags) error
- func (tc *TelemetryClient) HasAuth() bool
- func (tc *TelemetryClient) Processor() telemetrylib.TelemetryProcessor
- func (tc *TelemetryClient) Register() (err error)
- func (tc *TelemetryClient) RegistrationAccessible() bool
- func (tc *TelemetryClient) RegistrationPath() string
- func (tc *TelemetryClient) Submit() (err error)
- type TelemetryClientRegistration
- func (r *TelemetryClientRegistration) Accessible() bool
- func (r *TelemetryClientRegistration) DisableRetries()
- func (r *TelemetryClientRegistration) Generate() (err error)
- func (r *TelemetryClientRegistration) Load() (err error)
- func (r *TelemetryClientRegistration) Path() string
- func (r *TelemetryClientRegistration) Registration() types.ClientRegistration
- func (r *TelemetryClientRegistration) Remove() (err error)
- func (r *TelemetryClientRegistration) RetriesEnabled() bool
- func (r *TelemetryClientRegistration) Save() (err error)
- func (r *TelemetryClientRegistration) String() string
- func (r *TelemetryClientRegistration) Valid() bool
Constants ¶
View Source
const ( REGISTRATION_NAME = `registration` REGISTRATION_PERM = 0600 )
View Source
const (
AUTH_NAME = "credentials"
)
View Source
const (
// Path to Linux hardware UUID file under /sys
LINUX_SYSTEM_UUID_PATH = "/sys/class/dmi/id/product_uuid"
)
Variables ¶
View Source
var ( ErrClientNotAuthorized = errClientNotAuthorized() // general authorization failure ErrRegistrationRequired = errRegistrationRequired() // need to (re-)register ErrAuthenticationRequired = errAuthenticationRequired() // need to (re-authenticate) )
Functions ¶
This section is empty.
Types ¶
type TelemetryAuth ¶
type TelemetryAuth struct {
// TODO: unify these fields with restapi.ClientRegistrationResponse
RegistrationId int64 `json:"registrationId"`
Token types.TelemetryAuthToken `json:"authToken"`
RegistrationDate types.TelemetryTimeStamp `json:"registrationDate"`
}
TODO: unify with restapi.ClientRegistrationResponse
type TelemetryClient ¶
type TelemetryClient struct {
// contains filtered or unexported fields
}
func NewTelemetryClient ¶
func NewTelemetryClient(cfg *config.Config) (*TelemetryClient, error)
func (*TelemetryClient) AuthAccessible ¶
func (tc *TelemetryClient) AuthAccessible() bool
func (*TelemetryClient) AuthExpiration ¶
func (tc *TelemetryClient) AuthExpiration() (expiration time.Time, err error)
func (*TelemetryClient) AuthIssuer ¶
func (tc *TelemetryClient) AuthIssuer() (issuer string, err error)
func (*TelemetryClient) AuthPath ¶
func (tc *TelemetryClient) AuthPath() string
func (*TelemetryClient) Authenticate ¶
func (tc *TelemetryClient) Authenticate() (err error)
Authenticate is responsible for (re)authenticating an already registered client with the server to ensure that it's auth token is up to date.
func (*TelemetryClient) ClientId ¶
func (tc *TelemetryClient) ClientId() string
func (*TelemetryClient) CreateBundles ¶
func (tc *TelemetryClient) CreateBundles(tags types.Tags) error
func (*TelemetryClient) CreateReports ¶
func (tc *TelemetryClient) CreateReports(tags types.Tags) (err error)
func (*TelemetryClient) Generate ¶
func (tc *TelemetryClient) Generate(telemetry types.TelemetryType, content *types.TelemetryBlob, tags types.Tags) error
func (*TelemetryClient) HasAuth ¶
func (tc *TelemetryClient) HasAuth() bool
func (*TelemetryClient) Processor ¶
func (tc *TelemetryClient) Processor() telemetrylib.TelemetryProcessor
func (*TelemetryClient) Register ¶
func (tc *TelemetryClient) Register() (err error)
func (*TelemetryClient) RegistrationAccessible ¶
func (tc *TelemetryClient) RegistrationAccessible() bool
func (*TelemetryClient) RegistrationPath ¶
func (tc *TelemetryClient) RegistrationPath() string
func (*TelemetryClient) Submit ¶
func (tc *TelemetryClient) Submit() (err error)
type TelemetryClientRegistration ¶
type TelemetryClientRegistration struct {
types.ClientRegistration
// contains filtered or unexported fields
}
func NewTelemetryClientRegistration ¶
func NewTelemetryClientRegistration(cfg *config.Config) (*TelemetryClientRegistration, error)
func (*TelemetryClientRegistration) Accessible ¶
func (r *TelemetryClientRegistration) Accessible() bool
func (*TelemetryClientRegistration) DisableRetries ¶
func (r *TelemetryClientRegistration) DisableRetries()
func (*TelemetryClientRegistration) Generate ¶
func (r *TelemetryClientRegistration) Generate() (err error)
func (*TelemetryClientRegistration) Load ¶
func (r *TelemetryClientRegistration) Load() (err error)
func (*TelemetryClientRegistration) Path ¶
func (r *TelemetryClientRegistration) Path() string
func (*TelemetryClientRegistration) Registration ¶
func (r *TelemetryClientRegistration) Registration() types.ClientRegistration
func (*TelemetryClientRegistration) Remove ¶
func (r *TelemetryClientRegistration) Remove() (err error)
func (*TelemetryClientRegistration) RetriesEnabled ¶
func (r *TelemetryClientRegistration) RetriesEnabled() bool
func (*TelemetryClientRegistration) Save ¶
func (r *TelemetryClientRegistration) Save() (err error)
func (*TelemetryClientRegistration) String ¶
func (r *TelemetryClientRegistration) String() string
func (*TelemetryClientRegistration) Valid ¶
func (r *TelemetryClientRegistration) Valid() bool
Click to show internal directories.
Click to hide internal directories.