Documentation ¶
Index ¶
- Constants
- func New(table string, client *dynamodb.Client) repository.Node
- type DynamoNodeRepository
- func (d *DynamoNodeRepository) Create(ctx context.Context, node *node.Node) error
- func (d *DynamoNodeRepository) Delete(ctx context.Context, id node.Identifier) error
- func (d *DynamoNodeRepository) Get(ctx context.Context, id node.Identifier) (*node.Node, error)
- func (*DynamoNodeRepository) Init(ctx context.Context) error
- func (d *DynamoNodeRepository) List(ctx context.Context) ([]*node.Node, error)
- type NodeDdbRecord
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" AttributeCreatedAt = "created_at" AttributeUpdatedAt = "updated_at" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamoNodeRepository ¶
type DynamoNodeRepository struct {
// contains filtered or unexported fields
}
func (*DynamoNodeRepository) Delete ¶
func (d *DynamoNodeRepository) Delete(ctx context.Context, id node.Identifier) error
func (*DynamoNodeRepository) Get ¶
func (d *DynamoNodeRepository) Get(ctx context.Context, id node.Identifier) (*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"` CreatedAt time.Time `dynamodbav:"created_at"` UpdatedAt time.Time `dynamodbav:"updated_at"` }
func (*NodeDdbRecord) ToNode ¶
func (n *NodeDdbRecord) ToNode() *node.Node
Click to show internal directories.
Click to hide internal directories.