license

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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