licenceinfo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const LICENCEINFO1_STRUCT_SIZE = 221 // 20+7+6+4+3+8+10+108+10+18+8+9+7+3
View Source
const LICENCEINFO2_STRUCT_SIZE = 111 // 1+7+6+4+1+7+3+5+8+8+18+13+27

Variables

This section is empty.

Functions

This section is empty.

Types

type LICENCEINFO1

type LICENCEINFO1 struct {
	Prdid   prdid.PRDID   // 7 bytes
	Lictrm  lictrm.LICTRM // 6 bytes
	Feature []byte        // 4 bytes
	Lickey  lickey.LICKEY // 18 bytes
	Serial  serial.SERIAL // 7 bytes
	Prcgrp  prcgrp.PRCGRP // 3 bytes
	Vnddta  []byte        // 108 bytes

	// Internal
	RawStructure []byte
}

func (*LICENCEINFO1) GetFeatureString

func (l *LICENCEINFO1) GetFeatureString() string

Get the FEATURE string

func (*LICENCEINFO1) GetLickeyString

func (l *LICENCEINFO1) GetLickeyString() string

Get the LICKEY string

func (*LICENCEINFO1) GetLictrmString

func (l *LICENCEINFO1) GetLictrmString() string

Get the LICTRM string

func (*LICENCEINFO1) GetPrcgrpString

func (l *LICENCEINFO1) GetPrcgrpString() string

Get the PRCGRP string

func (*LICENCEINFO1) GetPrdidString

func (l *LICENCEINFO1) GetPrdidString() string

Get the PRDID string

func (*LICENCEINFO1) GetRawStructure

func (l *LICENCEINFO1) GetRawStructure() []byte

func (*LICENCEINFO1) GetSerialString

func (l *LICENCEINFO1) GetSerialString() string

Get the SERIAL string

func (*LICENCEINFO1) Print

func (l *LICENCEINFO1) Print() string

Print the licenceinfo structure

func (*LICENCEINFO1) ToCLAddLickey

func (l *LICENCEINFO1) ToCLAddLickey() string

Convert the licenceinfo structure to a CL ADDLICKEY command

func (*LICENCEINFO1) Unmarshal

func (l *LICENCEINFO1) Unmarshal(block []byte) (int, error)

Unmarshal the licenceinfo structure from the block of bytes

type LICENCEINFO2

type LICENCEINFO2 struct {
	Prdid   prdid.PRDID   // 7 bytes
	Lictrm  lictrm.LICTRM // 6 bytes
	Feature []byte        // 4 bytes
	Lickey  lickey.LICKEY // 18 bytes
	Serial  serial.SERIAL // 7 bytes
	Prcgrp  prcgrp.PRCGRP // 3 bytes

	// Internal
	RawStructure []byte
}

func (*LICENCEINFO2) GetFeatureString

func (l *LICENCEINFO2) GetFeatureString() string

Get the FEATURE string

func (*LICENCEINFO2) GetLickeyString

func (l *LICENCEINFO2) GetLickeyString() string

Get the LICKEY string

func (*LICENCEINFO2) GetLictrmString

func (l *LICENCEINFO2) GetLictrmString() string

Get the LICTRM string

func (*LICENCEINFO2) GetPrcgrpString

func (l *LICENCEINFO2) GetPrcgrpString() string

Get the PRCGRP string

func (*LICENCEINFO2) GetPrdidString

func (l *LICENCEINFO2) GetPrdidString() string

Get the PRDID string

func (*LICENCEINFO2) GetRawStructure

func (l *LICENCEINFO2) GetRawStructure() []byte

func (*LICENCEINFO2) GetSerialString

func (l *LICENCEINFO2) GetSerialString() string

Get the SERIAL string

func (*LICENCEINFO2) Print

func (l *LICENCEINFO2) Print() string

Print the licenceinfo structure

func (*LICENCEINFO2) ToCLAddLickey

func (l *LICENCEINFO2) ToCLAddLickey() string

Convert the licenceinfo structure to a CL ADDLICKEY command

func (*LICENCEINFO2) Unmarshal

func (l *LICENCEINFO2) Unmarshal(block []byte) (int, error)

Unmarshal the licenceinfo structure from the block of bytes

type LicenceInfoInterface

type LicenceInfoInterface interface {
	// Unmarshal parses the licence record from the provided bytes and returns the next index.
	Unmarshal(block []byte) (int, error)

	// ToCLAddLickey returns the IBM i CL command to add this licence key.
	ToCLAddLickey() string

	// Field accessors as strings
	GetPrdidString() string
	GetLictrmString() string
	GetFeatureString() string
	GetLickeyString() string
	GetSerialString() string
	GetPrcgrpString() string

	// Get the raw structure as a byte slice
	GetRawStructure() []byte

	// Human-readable single-line representation.
	Print() string
}

LicenceInfo defines the common behavior for licence information records. It is implemented by the different record layouts (e.g., LicenceInfo1, LicenceInfo2).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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