dynamo_node_repository

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeIdentifier         = "identifier"
	AttributePlatformIdentifier = "platform_identifier"
	AttributeProvider           = "provider_identifier"
	AttributeTailnet            = "tailnet"
	AttributeTailnetName        = "tailnet_device_name"
	AttributeTailnetIdentifier  = "tailnet_identifier"
	AttributeLocation           = "location"
	AttributePreauthKey         = "preauth_key"
	AttributeEphemeral          = "ephemeral"
	AttributeSize               = "size"
	AttributeCreatedAt          = "created_at"
	AttributeUpdatedAt          = "updated_at"
)

Variables

This section is empty.

Functions

func New

func New(table string, client *dynamodb.Client) repository.Node

Types

type DynamoNodeRepository

type DynamoNodeRepository struct {
	// contains filtered or unexported fields
}

func (*DynamoNodeRepository) Close added in v0.0.9

func (r *DynamoNodeRepository) Close()

func (*DynamoNodeRepository) Create

func (d *DynamoNodeRepository) Create(ctx context.Context, node *node.Node) error

func (*DynamoNodeRepository) Delete

func (*DynamoNodeRepository) Get

func (*DynamoNodeRepository) Init

func (*DynamoNodeRepository) List

func (d *DynamoNodeRepository) List(ctx context.Context) ([]*node.Node, error)

type NodeDdbRecord

type NodeDdbRecord struct {
	Identifier         string    `dynamodbav:"identifier"`
	PlatformIdentifier string    `dynamodbav:"platform_identifier"`
	Provider           string    `dynamodbav:"provider_identifier"`
	Tailnet            string    `dynamodbav:"tailnet"`
	TailnetName        string    `dynamodbav:"tailnet_device_name"`
	TailnetIdentifier  string    `dynamodbav:"tailnet_identifier"`
	Location           string    `dynamodbav:"location"`
	PreauthKey         string    `dynamodbav:"preauth_key"`
	Ephemeral          bool      `dynamodbav:"ephemeral"`
	Size               string    `dynamodbav:"size"`
	CreatedAt          time.Time `dynamodbav:"created_at"`
	UpdatedAt          time.Time `dynamodbav:"updated_at"`
}

func (*NodeDdbRecord) ToNode

func (n *NodeDdbRecord) ToNode() *node.Node

Jump to

Keyboard shortcuts

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