store

package
v2.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDKey                                          = "_id"                                           // must match with pb.ProvisioningRecord.Id, pb.EnrollmentGroup.Id tag
	HubIDKey                                       = "hubId"                                         // must match with pb.ProvisioningRecord.HubId
	HubIDsKey                                      = "hubIds"                                        // must match with pb.EnrollmentGroup.HubId
	AttestationMechanismX509LeadCertificateNameKey = "attestationMechanism.x509.leadCertificateName" // must match with all tags in path pb.EnrollmentGroup.AttestationMechanism.X509.LeadCertificateName
)
View Source
const (
	EnrollmentGroupIDKey = "enrollmentGroupId" // must match with pb.ProvisioningRecord.EnrollmentGroupID tag
	DeviceIDKey          = "deviceId"          // must match with pb.ProvisioningRecord.DeviceID tag
	AttestationKey       = "attestation"       // must match with pb.ProvisioningRecord.Attestation tag
	DateKey              = "date"              // must match with pb.ProvisioningRecord.Date tag
	CloudKey             = "cloud"             // must match with pb.ProvisioningRecord.Cloud tag
	ACLKey               = "acl"               // must match with pb.ProvisioningRecord.Acl tag
	CredentialKey        = "credential"        // must match with pb.ProvisioningRecord.Credential tag
	PlgdTimeKey          = "plgdTime"          // must match with pb.ProvisioningRecord.PlgdTime tag
	OwnershipKey         = "ownership"         // must match with pb.ProvisioningRecord.Ownership tag
	StatusKey            = "status"            // must match with pb.ProvisioningRecord.Status tag
	CreationDateKey      = "creationDate"      // must match with pb.ProvisioningRecord.CreationDate tag
	LocalEndpointsKey    = "localEndpoints"    // must match with pb.ProvisioningRecord.LocalEndpoints tag
	OwnerKey             = "owner"             // must match with pb.ProvisioningRecord.Owner tag
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnrollmentGroup

type EnrollmentGroup = pb.EnrollmentGroup

type EnrollmentGroupIter

type EnrollmentGroupIter interface {
	Next(ctx context.Context, enrollmentGroup *EnrollmentGroup) bool
	Err() error
}

type EnrollmentGroupsQuery

type EnrollmentGroupsQuery = pb.GetEnrollmentGroupsRequest

type Event

type Event string
const (
	EventDelete Event = "delete"
	EventUpdate Event = "update"
)

type Hub

type Hub = pb.Hub

type HubIter

type HubIter interface {
	Next(ctx context.Context, hub *Hub) bool
	Err() error
}

type HubsQuery

type HubsQuery = pb.GetHubsRequest

type LoadEnrollmentGroupsFunc

type LoadEnrollmentGroupsFunc = func(ctx context.Context, iter EnrollmentGroupIter) (err error)

type LoadHubsFunc

type LoadHubsFunc = func(ctx context.Context, iter HubIter) (err error)

type LoadProvisioningRecordsFunc

type LoadProvisioningRecordsFunc = func(ctx context.Context, iter ProvisioningRecordIter) (err error)

type ProvisioningRecord

type ProvisioningRecord = pb.ProvisioningRecord

type ProvisioningRecordIter

type ProvisioningRecordIter interface {
	Next(ctx context.Context, provisioningRecord *ProvisioningRecord) bool
	Err() error
}

type ProvisioningRecordsQuery

type ProvisioningRecordsQuery = pb.GetProvisioningRecordsRequest

type Store

type Store interface {
	UpdateProvisioningRecord(ctx context.Context, owner string, sub *ProvisioningRecord) error
	DeleteProvisioningRecords(ctx context.Context, owner string, query *ProvisioningRecordsQuery) (int64, error)
	LoadProvisioningRecords(ctx context.Context, owner string, query *ProvisioningRecordsQuery, h LoadProvisioningRecordsFunc) error

	CreateEnrollmentGroup(ctx context.Context, owner string, enrollmentGroup *EnrollmentGroup) error
	UpdateEnrollmentGroup(ctx context.Context, owner string, enrollmentGroup *EnrollmentGroup) error
	DeleteEnrollmentGroups(ctx context.Context, owner string, query *EnrollmentGroupsQuery) (int64, error)
	LoadEnrollmentGroups(ctx context.Context, owner string, query *EnrollmentGroupsQuery, h LoadEnrollmentGroupsFunc) error
	// returned iterator need to be close after use.
	WatchEnrollmentGroups(ctx context.Context) (WatchEnrollmentGroupIter, error)

	CreateHub(ctx context.Context, owner string, hub *Hub) error
	UpdateHub(ctx context.Context, owner string, hub *Hub) error
	DeleteHubs(ctx context.Context, owner string, query *HubsQuery) (int64, error)
	LoadHubs(ctx context.Context, owner string, query *HubsQuery, h LoadHubsFunc) error
	// returned iterator need to be close after use.
	WatchHubs(ctx context.Context) (WatchHubIter, error)

	Close(ctx context.Context) error
}

type WatchEnrollmentGroupIter

type WatchEnrollmentGroupIter interface {
	Next(ctx context.Context) (event Event, id string, ok bool)
	Err() error
	Close() error
}

type WatchHubIter

type WatchHubIter interface {
	Next(ctx context.Context) (event Event, id string, ok bool)
	Err() error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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