licenses

package
v0.0.5-dev.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type LicenseDescription

type LicenseDescription struct {
	ID          string
	SKU         string
	Name        string
	Description string
	Assigned    int
	Total       int
}

type LicenseManager

type LicenseManager interface {
	//AssignLicense assign a license to a user. Maybe add the full user object here for things like gitlab
	AssignLicense(ctx context.Context, userdId string, licenseSkus ...string) error

	//RemoveLicense removes a license to a user. Maybe add the full user object here for things like gitlab
	RemoveLicense(ctx context.Context, userdId string, licenseSkus ...string) error

	// Get the licenses for a user
	GetUserAssigned(ctx context.Context, userdId string) ([]*LicenseDescription, error)

	//GetAssigned gets a list of all the users with licenses
	GetAssigned(ctx context.Context, licenseSku string) ([]*models.User, error)

	//ListLicenses List all the managed licenses
	ListLicenses(ctx context.Context) ([]*LicenseDescription, error)
}

Jump to

Keyboard shortcuts

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