license

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DMV

type DMV struct {
	// contains filtered or unexported fields
}

DMV represents the DMV specific license provider

func NewProvider

func NewProvider(modifiers ...ProviderModifierFn) *DMV

NewProvider constructs a new dmv provider

func (*DMV) GetAccessKey

func (d *DMV) GetAccessKey(ctx context.Context, token, version string) (*Response, error)

GetAccessKey returns the license access key corresponding to the supplied version if the given token is valid.

type Provider

type Provider interface {
	GetAccessKey(context.Context, string, string) (*Response, error)
}

Provider defines a license provider

type ProviderModifierFn

type ProviderModifierFn func(*DMV)

ProviderModifierFn modifies the provider.

func WithEndpoint

func WithEndpoint(endpoint *url.URL) ProviderModifierFn

WithEndpoint sets endpoint for the license provider.

func WithOrgID

func WithOrgID(orgID string) ProviderModifierFn

WithOrgID sets orgID for the license provider.

func WithProductID

func WithProductID(productID string) ProviderModifierFn

WithProductID sets productID for the license provider.

type Response

type Response struct {
	AccessKey string `json:"key"`
	Signature string `json:"signature"`
}

Response is the response returned from a successful access key request

Jump to

Keyboard shortcuts

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