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() int
- func (c *KeycodeMgt) IsExpired() bool
- func (c *KeycodeMgt) IsValid() 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 KeycodeStatusObject
- type RegistrationDataResult
- type Result
- type Retention
- type ServiceAgreement
Constants ¶
View Source
const ( KeycodeStatusUnknown = 0 KeycodeStatusNoKeycode = 1 KeycodeStatusInvalid = 2 KeycodeStatusExpired = 3 KeycodeStatusNotActivated = 4 KeycodeStatusValid = 5 )
Variables ¶
View Source
var ( KeycodeCliPath = defaultCliPath KeycodeDuration int64 = defaultRefreshInterval KeycodeStatus = KeycodeStatusUnknown KeycodeAesKey = []byte("") KeycodeTimestamp int64 = 0 KeycodeList []*Keycode = nil KeycodeSummary *Keycode = nil KeycodeTM time.Time InfluxConfig *InternalInflux.Config LdapConfig *InternalLdap.Config )
View Source
var KeycodeStatusMessage = map[int]string{
0: "Unknown keycode is detected",
1: "No keycode is applied",
2: "Invalid keycode is detected",
3: "Keycode is expired",
4: "Keycode is not activated",
5: "A valid keycode is applied",
}
View Source
var KeycodeStatusName = map[int]string{
0: "Unknown",
1: "No Keycode",
2: "Invalid",
3: "Expired",
4: "Not Activated",
5: "Valid",
}
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 *KeycodeStatusObject KeycodeStatus int }
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() int
func (*KeycodeMgt) IsExpired ¶
func (c *KeycodeMgt) IsExpired() bool
func (*KeycodeMgt) IsValid ¶
func (c *KeycodeMgt) IsValid() 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 KeycodeStatusObject ¶
type KeycodeStatusObject struct { }
func NewKeycodeStatusObject ¶
func NewKeycodeStatusObject() *KeycodeStatusObject
func (*KeycodeStatusObject) GetStatus ¶
func (c *KeycodeStatusObject) GetStatus() int
type RegistrationDataResult ¶
type ServiceAgreement ¶
type ServiceAgreement struct { }
Click to show internal directories.
Click to hide internal directories.