persist

package
v0.0.0-...-ef7a112 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address string

Address represents an Ethereum address

const ZeroAddress Address = "0x0000000000000000000000000000000000000000"

ZeroAddress is the all-zero Ethereum address

func (Address) Address

func (a Address) Address() common.Address

Address returns the ethereum address byte array

func (Address) MarshalJSON

func (a Address) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for the address type

func (Address) String

func (a Address) String() string

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for the address type

func (Address) Value

func (a Address) Value() (driver.Value, error)

Value implements the database/sql/driver Valuer interface for the address type

type Policy

type Policy struct {
	ContextID string `json:"context_id"`
	PolicyID  string `json:"policy_id"`
}

Policy represents an identifier for a policy within an access context

func ParsePolicyFromIdentifierString

func ParsePolicyFromIdentifierString(data string) (*Policy, error)

ParsePolicyFromIdentifierString Parses string to Policy type

func (Policy) String

func (p Policy) String() string

type PolicyIdentifier

type PolicyIdentifier struct {
	ContextID common.Hash `json:"context_id"`
	PolicyID  common.Hash `json:"policy_id"`
}

PolicyIdentifier represents an identifier for a policy within an access context

func NewPolicyIdentifier

func NewPolicyIdentifier(contextID string, policyID string) PolicyIdentifier

NewPolicyIdentifier creates a new token identifiers

func (PolicyIdentifier) String

func (p PolicyIdentifier) String() string

func (PolicyIdentifier) Value

func (p PolicyIdentifier) Value() (driver.Value, error)

Value implements the driver.Valuer interface

type Role

type Role struct {
	ContextID string `json:"context_id"`
	RoleID    string `json:"role_id"`
}

Role represents an identifier for a role within an access context

func ParseRoleFromIdentifierString

func ParseRoleFromIdentifierString(data string) (*Role, error)

ParseRoleFromIdentifierString Parses string to Role type

func (Role) String

func (r Role) String() string

type RoleIdentifier

type RoleIdentifier struct {
	ContextID common.Hash `json:"context_id"`
	RoleID    common.Hash `json:"role_id"`
}

RoleIdentifier represents an identifier for a role within an access context

func NewRoleIdentifier

func NewRoleIdentifier(contextID string, roleID string) RoleIdentifier

NewRoleIdentifier creates a new token identifiers

func (RoleIdentifier) String

func (r RoleIdentifier) String() string

func (RoleIdentifier) Value

func (r RoleIdentifier) Value() (driver.Value, error)

Value implements the driver.Valuer interface

Jump to

Keyboard shortcuts

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