Policy

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyId

type PolicyId struct {
	Value string
}

func FromBytes

func FromBytes(value []byte) (*PolicyId, error)

*

FromBytes creates a new PolicyId from a byte slice.

Params:
	value []byte: The byte slice representing the policy ID.

Returns:
	*PolicyId: A pointer to the PolicyId.
	error: An error if the input byte slice is not of the expected length.

func New

func New(value string) (*PolicyId, error)

*

New creates a new PolicyId from a hexadecimal string

Params:
	value string: The hexadecimal string representing the policy ID.

Returns:
	*PolicyId: A pointer to the PolicyId.
	error: An error if the input string is not of the expected length.

func (*PolicyId) MarshalCBOR

func (policyId *PolicyId) MarshalCBOR() ([]byte, error)

*

MarshalCBOR serializes the PolicyId to CBOR format.

Returns:
	[]byte: The CBOR serialized data.
	error: An error if the serialization fails.

func (PolicyId) String

func (policyId PolicyId) String() string

*

String returns the hexadecimal string representation
of the PolicyId.

func (*PolicyId) UnmarshalCBOR

func (policyId *PolicyId) UnmarshalCBOR(value []byte) error

*

UnmarshalCBOR deserializes the PolicyId from CBOR format.

Params:
	value []byte: The CBOR serialized data.

Returns:
	error: An error if the deserialization fails.

Jump to

Keyboard shortcuts

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