Documentation ¶
Index ¶
- func New(db interfaces.SqlDatabase) repository.Node
- type NodeSqlRecord
- type SqliteNodeRepository
- func (r *SqliteNodeRepository) Create(ctx context.Context, node *node.Node) error
- func (r *SqliteNodeRepository) Delete(ctx context.Context, id node.Identifier) error
- func (r *SqliteNodeRepository) Get(ctx context.Context, id node.Identifier) (*node.Node, error)
- func (r *SqliteNodeRepository) Init(ctx context.Context) error
- func (r *SqliteNodeRepository) List(ctx context.Context) ([]*node.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(db interfaces.SqlDatabase) repository.Node
Types ¶
type NodeSqlRecord ¶
type NodeSqlRecord struct { Identifier string `db:"identifier"` PlatformIdentifier string `db:"platform_identifier"` Provider string `db:"provider_identifier"` Tailnet string `db:"tailnet"` TailnetName string `db:"tailnet_device_name"` TailnetIdentifier string `db:"tailnet_identifier"` Location string `db:"location"` PreauthKey string `db:"preauth_key"` Ephemeral bool `db:"ephemeral"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func (*NodeSqlRecord) ToNode ¶
func (n *NodeSqlRecord) ToNode() *node.Node
type SqliteNodeRepository ¶
type SqliteNodeRepository struct {
// contains filtered or unexported fields
}
func (*SqliteNodeRepository) Delete ¶
func (r *SqliteNodeRepository) Delete(ctx context.Context, id node.Identifier) error
func (*SqliteNodeRepository) Get ¶
func (r *SqliteNodeRepository) Get(ctx context.Context, id node.Identifier) (*node.Node, error)
Click to show internal directories.
Click to hide internal directories.