configstatus

package
v3.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ProgressCheckInterval = time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigAbortBuilder

type ConfigAbortBuilder struct{}

func (*ConfigAbortBuilder) New

type ConfigAbortData

type ConfigAbortData struct {
	MeasurementGroup string
	Event            string
	Values           ConfigSuccessValues
	Dimensions       ConfigSuccessDimensions
}

type ConfigAbortDimensions

type ConfigAbortDimensions struct {
	ReportClick string `json:"report_click"`
	ReportSent  string `json:"report_sent"`
	ClickedLink string `json:"clicked_link"`
}

type ConfigAbortValues

type ConfigAbortValues struct {
	Duration int `json:"duration"`
}

type ConfigProgressBuilder

type ConfigProgressBuilder struct{}

func (*ConfigProgressBuilder) New

type ConfigProgressData

type ConfigProgressData struct {
	MeasurementGroup string
	Event            string
	Values           ConfigProgressValues
	Dimensions       struct{}
}

type ConfigProgressValues

type ConfigProgressValues struct {
	NbDay          int `json:"nb_day"`
	NbDaySinceLast int `json:"nb_day_since_last"`
}

type ConfigRecoveryBuilder

type ConfigRecoveryBuilder struct{}

func (*ConfigRecoveryBuilder) New

type ConfigRecoveryData

type ConfigRecoveryData struct {
	MeasurementGroup string
	Event            string
	Values           ConfigRecoveryValues
	Dimensions       ConfigRecoveryDimensions
}

type ConfigRecoveryDimensions

type ConfigRecoveryDimensions struct {
	Autoconf       string `json:"autoconf"`
	ReportClick    string `json:"report_click"`
	ReportSent     string `json:"report_sent"`
	ClickedLink    string `json:"clicked_link"`
	FailureDetails string `json:"failure_details"`
}

type ConfigRecoveryValues

type ConfigRecoveryValues struct {
	Duration int `json:"duration"`
}

type ConfigSuccessBuilder

type ConfigSuccessBuilder struct{}

func (*ConfigSuccessBuilder) New

type ConfigSuccessData

type ConfigSuccessData struct {
	MeasurementGroup string
	Event            string
	Values           ConfigSuccessValues
	Dimensions       ConfigSuccessDimensions
}

type ConfigSuccessDimensions

type ConfigSuccessDimensions struct {
	Autoconf    string `json:"autoconf"`
	ReportClick string `json:"report_click"`
	ReportSent  string `json:"report_sent"`
	ClickedLink string `json:"clicked_link"`
}

type ConfigSuccessValues

type ConfigSuccessValues struct {
	Duration int `json:"duration"`
}

type ConfigurationStatus

type ConfigurationStatus struct {
	FilePath string
	DataLock safe.RWMutex

	Data *ConfigurationStatusData
}

func LoadConfigurationStatus

func LoadConfigurationStatus(filepath string) (*ConfigurationStatus, error)

func (*ConfigurationStatus) ApplyFailure

func (status *ConfigurationStatus) ApplyFailure(err string) error

func (*ConfigurationStatus) ApplyProgress

func (status *ConfigurationStatus) ApplyProgress() error

func (*ConfigurationStatus) ApplySuccess

func (status *ConfigurationStatus) ApplySuccess() error

func (*ConfigurationStatus) AutoconfigUsed

func (status *ConfigurationStatus) AutoconfigUsed(client string) error

func (*ConfigurationStatus) IsFromFailure

func (status *ConfigurationStatus) IsFromFailure() bool

func (*ConfigurationStatus) IsPending

func (status *ConfigurationStatus) IsPending() bool

func (*ConfigurationStatus) Load

func (status *ConfigurationStatus) Load() error

func (*ConfigurationStatus) RecordLinkClicked

func (status *ConfigurationStatus) RecordLinkClicked(link uint) error

func (*ConfigurationStatus) Remove

func (status *ConfigurationStatus) Remove() error

func (*ConfigurationStatus) ReportClicked

func (status *ConfigurationStatus) ReportClicked() error

func (*ConfigurationStatus) ReportSent

func (status *ConfigurationStatus) ReportSent() error

func (*ConfigurationStatus) Save

func (status *ConfigurationStatus) Save() error

type ConfigurationStatusData

type ConfigurationStatusData struct {
	Metadata Metadata `json:"metadata"`
	DataV1   DataV1   `json:"dataV1"`
}

type DataV1

type DataV1 struct {
	PendingSince   time.Time `json:"pending_since"`
	LastProgress   time.Time `json:"last_progress"`
	Autoconf       string    `json:"auto_conf"`
	ClickedLink    uint64    `json:"clicked_link"`
	ReportSent     bool      `json:"report_sent"`
	ReportClick    bool      `json:"report_click"`
	FailureDetails string    `json:"failure_details"`
}

type Metadata

type Metadata struct {
	Version string `json:"version"`
}

type MetadataOnly

type MetadataOnly struct {
	Metadata Metadata `json:"metadata"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL