Documentation ¶
Index ¶
- Constants
- Variables
- func KeycodeInit(config *Config) error
- func NewKeycodeEvent(level DatahubV1alpha1.EventLevel, message string) *DatahubV1alpha1.Event
- func PostEvent(level DatahubV1alpha1.EventLevel, message string) error
- type AllKeycodesResult
- type Capacity
- type Config
- type Functionality
- type Keycode
- type KeycodeExecutor
- func (c *KeycodeExecutor) AddKeycode(keycode string) error
- func (c *KeycodeExecutor) DeleteKeycode(keycode string) error
- func (c *KeycodeExecutor) GetAllKeycodes() ([]*Keycode, *Keycode, error)
- func (c *KeycodeExecutor) GetKeycode(keycode string) (*Keycode, error)
- func (c *KeycodeExecutor) GetKeycodeSummary() (*Keycode, error)
- func (c *KeycodeExecutor) GetRegistrationData() (string, error)
- func (c *KeycodeExecutor) PutSignatureData(signatureData string) error
- func (c *KeycodeExecutor) PutSignatureDataFile(filePath string) error
- type KeycodeMgt
- func (c *KeycodeMgt) AddKeycode(keycode string) error
- func (c *KeycodeMgt) DeleteKeycode(keycode string) error
- func (c *KeycodeMgt) GetAllKeycodes() ([]*Keycode, *Keycode, error)
- func (c *KeycodeMgt) GetKeycode(keycode string) (*Keycode, error)
- func (c *KeycodeMgt) GetKeycodeSummary() (*Keycode, error)
- func (c *KeycodeMgt) GetKeycodes(keycodes []string) ([]*Keycode, *Keycode, error)
- func (c *KeycodeMgt) GetRegistrationData() (string, error)
- func (c *KeycodeMgt) GetStatus() string
- func (c *KeycodeMgt) IsExpired() bool
- func (c *KeycodeMgt) PutSignatureData(signatureData string) error
- func (c *KeycodeMgt) PutSignatureDataFile(filePath string) error
- func (c *KeycodeMgt) Refresh(force bool) error
- type KeycodeResult
- type KeycodeStatus
- type RegistrationDataResult
- type Result
- type Retention
- type ServiceAgreement
Constants ¶
View Source
const ( KeycodeStatusNoKeycode = "No Keycode" KeycodeStatusInvalid = "Invalid" KeycodeStatusExpired = "Expired" KeycodeStatusNotActivated = "Not Activated" KeycodeStatusValid = "Valid" KeycodeStatusUnknown = "Unknown" )
Variables ¶
View Source
var ( KeycodeCliPath = defaultCliPath KeycodeDuration int64 = defaultRefreshInterval KeycodeLicenseStatus = "" KeycodeAesKey = []byte("") KeycodeTimestamp int64 = 0 KeycodeList []*Keycode = nil KeycodeSummary *Keycode = nil KeycodeTM time.Time InfluxConfig *InternalInflux.Config LdapConfig *InternalLdap.Config )
Functions ¶
func KeycodeInit ¶
func NewKeycodeEvent ¶
func NewKeycodeEvent(level DatahubV1alpha1.EventLevel, message string) *DatahubV1alpha1.Event
func PostEvent ¶
func PostEvent(level DatahubV1alpha1.EventLevel, message string) error
Types ¶
type AllKeycodesResult ¶
type Config ¶
type Config struct { CliPath string RefreshInterval int64 AesKey []byte InfluxDB *InternalInflux.Config Ldap *InternalLdap.Config }
Configuration of keycode CLI
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
Provide default configuration for keycode CLI
type Functionality ¶
type Keycode ¶
type Keycode struct { Keycode string `json:"keycode" example:"A5IMH-KBAFI-XTEDK-G4OQM-QMM67-4TEST"` KeycodeType string `json:"keycodeType" example:"Regular/Trial"` KeycodeVersion int `json:"keycodeVersion" example:"2"` ApplyTimestamp int64 `json:"applyTimestamp" example:"1546271999"` ExpireTimestamp int64 `json:"expireTimestamp" example:"1546271999"` LicenseState string `json:"licenseState" example:"Valid/Invalid/Expired"` Registered bool `json:"registered" example:"false"` Capacity Capacity `json:"capacity" example:"capacity"` Functionality Functionality `json:"functionality" example:"functionality"` Retention Retention `json:"retention" example:"retention"` ServiceAgreement ServiceAgreement `json:"serviceAgreement" example:"service agreement"` Description string `json:"description" example:"your-description"` }
func NewKeycode ¶
type KeycodeExecutor ¶
func NewKeycodeExecutor ¶
func NewKeycodeExecutor() *KeycodeExecutor
func (*KeycodeExecutor) AddKeycode ¶
func (c *KeycodeExecutor) AddKeycode(keycode string) error
func (*KeycodeExecutor) DeleteKeycode ¶
func (c *KeycodeExecutor) DeleteKeycode(keycode string) error
func (*KeycodeExecutor) GetAllKeycodes ¶
func (c *KeycodeExecutor) GetAllKeycodes() ([]*Keycode, *Keycode, error)
func (*KeycodeExecutor) GetKeycode ¶
func (c *KeycodeExecutor) GetKeycode(keycode string) (*Keycode, error)
func (*KeycodeExecutor) GetKeycodeSummary ¶
func (c *KeycodeExecutor) GetKeycodeSummary() (*Keycode, error)
func (*KeycodeExecutor) GetRegistrationData ¶
func (c *KeycodeExecutor) GetRegistrationData() (string, error)
func (*KeycodeExecutor) PutSignatureData ¶
func (c *KeycodeExecutor) PutSignatureData(signatureData string) error
func (*KeycodeExecutor) PutSignatureDataFile ¶
func (c *KeycodeExecutor) PutSignatureDataFile(filePath string) error
type KeycodeMgt ¶
type KeycodeMgt struct { Executor *KeycodeExecutor Status *KeycodeStatus KeycodeStatus string }
func NewKeycodeMgt ¶
func NewKeycodeMgt() *KeycodeMgt
func (*KeycodeMgt) AddKeycode ¶
func (c *KeycodeMgt) AddKeycode(keycode string) error
func (*KeycodeMgt) DeleteKeycode ¶
func (c *KeycodeMgt) DeleteKeycode(keycode string) error
func (*KeycodeMgt) GetAllKeycodes ¶
func (c *KeycodeMgt) GetAllKeycodes() ([]*Keycode, *Keycode, error)
func (*KeycodeMgt) GetKeycode ¶
func (c *KeycodeMgt) GetKeycode(keycode string) (*Keycode, error)
func (*KeycodeMgt) GetKeycodeSummary ¶
func (c *KeycodeMgt) GetKeycodeSummary() (*Keycode, error)
func (*KeycodeMgt) GetKeycodes ¶
func (c *KeycodeMgt) GetKeycodes(keycodes []string) ([]*Keycode, *Keycode, error)
func (*KeycodeMgt) GetRegistrationData ¶
func (c *KeycodeMgt) GetRegistrationData() (string, error)
func (*KeycodeMgt) GetStatus ¶
func (c *KeycodeMgt) GetStatus() string
func (*KeycodeMgt) IsExpired ¶
func (c *KeycodeMgt) IsExpired() bool
func (*KeycodeMgt) PutSignatureData ¶
func (c *KeycodeMgt) PutSignatureData(signatureData string) error
func (*KeycodeMgt) PutSignatureDataFile ¶
func (c *KeycodeMgt) PutSignatureDataFile(filePath string) error
func (*KeycodeMgt) Refresh ¶
func (c *KeycodeMgt) Refresh(force bool) error
type KeycodeResult ¶
type KeycodeStatus ¶
type KeycodeStatus struct { }
func NewKeycodeStatus ¶
func NewKeycodeStatus() *KeycodeStatus
func (*KeycodeStatus) GetStatus ¶
func (c *KeycodeStatus) GetStatus() string
type RegistrationDataResult ¶
type ServiceAgreement ¶
type ServiceAgreement struct { }
Click to show internal directories.
Click to hide internal directories.