 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func InitSearchIndex() error
- func SetList(licenses []Options)
- type Attachment
- type Expiry
- type Issue
- type Node
- type Options
- func (o *Options) GenSearchableObject() Options
- func (o *Options) InitCompromisedStatus()
- func (o *Options) InitExpiredStatus()
- func (o *Options) InitInvalidHardwareStatus()
- func (o *Options) InitInvalidSignatureStatus()
- func (o *Options) InitValidStatus()
- func (o *Options) IsValid() bool
- func (o *Options) Key() string
 
- type Product
- type Raw
- type Verification
Constants ¶
      View Source
      
  
const ( Module = "licenses" Dir = "/etc/update" )
Variables ¶
This section is empty.
Functions ¶
func InitSearchIndex ¶
func InitSearchIndex() error
Types ¶
type Attachment ¶
type Attachment struct {
	SerialNumber string `json:"serialNumber"`
	Hostname     string `json:"hostname"`
	Role         string `json:"role"`
	Product      string `json:"product"`
	Status       string `json:"status"`
}
    func (*Attachment) GenSearchableObject ¶
func (o *Attachment) GenSearchableObject() Attachment
type Options ¶
type Options struct {
	Name        string   `json:"name" yaml:"name" bson:"name"`
	Type        string   `json:"type" yaml:"type" bson:"type"`
	Hostname    string   `json:"hostname,omitzero" yaml:"hostname" bson:"hostname"`
	Hosts       []string `json:"hosts,omitempty" yaml:"hosts" bson:"hosts"`
	Serial      string   `json:"serial,omitzero" yaml:"serial" bson:"serial"`
	Product     `json:"product" yaml:"product" bson:"product"`
	Issue       `json:"issue" yaml:"issue" bson:"issue"`
	Quantity    string `json:"quantity" yaml:"quantity" bson:"quantity"`
	SupportPlan string `json:"supportPlan" yaml:"supportPlan" bson:"supportPlan"`
	Expiry      `json:"expiry" yaml:"expiry" bson:"expiry"`
	Status      status.License `json:"status" yaml:"status" bson:"status"`
}
    func (*Options) GenSearchableObject ¶
note: in the current search lib(bleve), the algo is not able to detect the string if it include uppercase we've tried a few different init settings, but the result is not as expected as always currenlty, the only way we found is to convert all the string to lower case and inject to searcher
func (*Options) InitCompromisedStatus ¶
func (o *Options) InitCompromisedStatus()
func (*Options) InitExpiredStatus ¶
func (o *Options) InitExpiredStatus()
func (*Options) InitInvalidHardwareStatus ¶
func (o *Options) InitInvalidHardwareStatus()
func (*Options) InitInvalidSignatureStatus ¶
func (o *Options) InitInvalidSignatureStatus()
func (*Options) InitValidStatus ¶
func (o *Options) InitValidStatus()
type Raw ¶
type Raw struct {
	Name     string `json:"name" yaml:"name" bson:"name"`
	Type     string `json:"type" yaml:"type" bson:"type"`
	Hostname string `json:"hostname" yaml:"hostname" bson:"hostname"`
	Product  string `json:"product" yaml:"product" bson:"product"`
	Feature  string `json:"feature" yaml:"feature" bson:"feature"`
	Quantity string `json:"quantity" yaml:"quantity" bson:"quantity"`
	SLA      string `json:"sla" yaml:"sla" bson:"sla"`
	Serial   string `json:"serial" yaml:"serial" bson:"serial"`
	Check    int    `json:"check" yaml:"check" bson:"check"`
	IssueBy  string `json:"issueby" yaml:"issueby" bson:"issueby"`
	IssueTo  string `json:"issueto" yaml:"issueto" bson:"issueto"`
	Hardware string `json:"hardware" yaml:"hardware" bson:"hardware"`
	Expiry   string `json:"expiry" yaml:"expiry" bson:"expiry"`
	Date     string `json:"date" yaml:"date" bson:"date"`
	Days     int    `json:"days" yaml:"days" bson:"days"`
}
    func (*Raw) IsUnlicense ¶
type Verification ¶
 Click to show internal directories. 
   Click to hide internal directories.