licensestatuses

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("License Status not found")

ErrNotFound is license status not found

Functions

This section is empty.

Types

type LicenseStatus

type LicenseStatus struct {
	ID                int                  `json:"-"`
	LicenseRef        string               `json:"id"`
	Status            string               `json:"status"`
	Updated           *Updated             `json:"updated,omitempty"`
	Message           string               `json:"message"`
	Links             []Link               `json:"links,omitempty"`
	DeviceCount       *int                 `json:"device_count,omitempty"`
	PotentialRights   *PotentialRights     `json:"potential_rights,omitempty"`
	Events            []transactions.Event `json:"events,omitempty"`
	CurrentEndLicense *time.Time           `json:"-"`
}

LicenseStatus represents a license status

type LicenseStatuses

type LicenseStatuses interface {
	Add(ls LicenseStatus) error
	List(deviceLimit int64, limit int64, offset int64) func() (LicenseStatus, error)
	GetByLicenseID(id string) (*LicenseStatus, error)
	Update(ls LicenseStatus) error
	// contains filtered or unexported methods
}

LicenseStatuses is an interface

func Open

func Open(db *sql.DB) (l LicenseStatuses, err error)

Open defines scripts for queries & create table license_status if it does not exist

type Link struct {
	Rel       string `json:"rel"`
	Href      string `json:"href"`
	Type      string `json:"type,omitempty"`
	Title     string `json:"title,omitempty"`
	Profile   string `json:"profile,omitempty"`
	Templated bool   `json:"templated,omitempty" "default false"`
}

Link represents a link object

type PotentialRights

type PotentialRights struct {
	End *time.Time `json:"end,omitempty"`
}

PotentialRights represents the maximal extension time of a loan

type Updated

type Updated struct {
	License *time.Time `json:"license,omitempty"`
	Status  *time.Time `json:"status,omitempty"`
}

Updated represents license and status document timestamps

Jump to

Keyboard shortcuts

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