status

package
v0.0.0-...-da9a50a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_READY     = "ready"
	STATUS_ACTIVE    = "active"
	STATUS_REVOKED   = "revoked"
	STATUS_RETURNED  = "returned"
	STATUS_CANCELLED = "cancelled"
	STATUS_EXPIRED   = "expired"
	EVENT_RENEWED    = "renewed"
)

List of status values as strings

View Source
const (
	STATUS_READY_INT     = 0
	STATUS_ACTIVE_INT    = 1
	STATUS_REVOKED_INT   = 2
	STATUS_RETURNED_INT  = 3
	STATUS_CANCELLED_INT = 4
	STATUS_EXPIRED_INT   = 5
	EVENT_RENEWED_INT    = 6
)

List of status values as int

Variables

View Source
var EventTypes = map[int]string{
	STATUS_ACTIVE_INT:    "register",
	STATUS_REVOKED_INT:   "revoke",
	STATUS_RETURNED_INT:  "return",
	STATUS_CANCELLED_INT: "cancel",
	STATUS_EXPIRED_INT:   "expire",
	EVENT_RENEWED_INT:    "renew",
}

EventTypes defines additional event types. It reuses all status values and adds one for renewed licenses.

StatusValues defines status values logged in license status documents

Functions

func GetStatus

func GetStatus(statusDB int64, status *string)

GetStatus translates status number to status string

func SetStatus

func SetStatus(status string) (int64, error)

SetStatus translates status string to status number

Types

This section is empty.

Jump to

Keyboard shortcuts

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