entity

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	ID                 uuid.NullUUID
	Data               []byte // Raw bundle data.
	Digest             []byte // SHA-256 digest of the bundle data.
	Signature          []byte // Raw signature of the bundle data.
	SigningCertificate []byte
	TrustDomainID      uuid.UUID
	TrustDomainName    spiffeid.TrustDomain
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

Bundle represents a SPIFFE Trust bundle along with its digest.

func (*Bundle) ConsoleString

func (b *Bundle) ConsoleString() string

func (*Bundle) String

func (b *Bundle) String() string

type ConsentStatus

type ConsentStatus string
const (
	ConsentStatusApproved ConsentStatus = "approved"
	ConsentStatusDenied   ConsentStatus = "denied"
	ConsentStatusPending  ConsentStatus = "pending"
)

type JoinToken

type JoinToken struct {
	ID              uuid.NullUUID
	Token           string
	Used            bool
	TrustDomainID   uuid.UUID
	TrustDomainName spiffeid.TrustDomain
	ExpiresAt       time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

func (*JoinToken) ConsoleString

func (jt *JoinToken) ConsoleString() string

func (*JoinToken) String

func (jt *JoinToken) String() string

type Relationship

type Relationship struct {
	ID                  uuid.NullUUID
	TrustDomainAID      uuid.UUID
	TrustDomainBID      uuid.UUID
	TrustDomainAName    spiffeid.TrustDomain
	TrustDomainBName    spiffeid.TrustDomain
	TrustDomainAConsent ConsentStatus
	TrustDomainBConsent ConsentStatus
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

func FilterRelationships

func FilterRelationships(relationships []*Relationship, status ConsentStatus, trustDomain *uuid.UUID) []*Relationship

FilterRelationships filters a slice of Relationship entities based on a trust domain ID and consent status. If the trust domain ID is nil, it filters based on the consent status only. If the trust domain ID is not nil, it filters based on both the trust domain ID and the consent status. Parameters: - relationships: The slice of Relationship entities to be filtered. - status: The consent status to be used as a filter criterion. - trustDomain: The ID of the trust domain for which relationships are to be filtered. Can be nil. Return: A slice of Relationship entities that match the filter criteria.

func (*Relationship) ConsoleString

func (rel *Relationship) ConsoleString() string

func (*Relationship) String

func (rel *Relationship) String() string

type TrustDomain

type TrustDomain struct {
	ID          uuid.NullUUID
	Name        spiffeid.TrustDomain
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func (*TrustDomain) ConsoleString

func (td *TrustDomain) ConsoleString() string

func (*TrustDomain) String

func (td *TrustDomain) String() string

Jump to

Keyboard shortcuts

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