sqlite

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prefix

type Prefix struct {
	Id       string `gorm:"primaryKey"`
	Name     string
	Cidr     string
	ParentID string
	Parent   *Prefix
}

type SQLiteIPAMStorage

type SQLiteIPAMStorage struct {
	DB *gorm.DB
	// contains filtered or unexported fields
}

func New

func New(datastore string) (*SQLiteIPAMStorage, error)

func (*SQLiteIPAMStorage) Add

func (sqlis *SQLiteIPAMStorage) Add(ctx context.Context, prefix types.Prefix) error

func (*SQLiteIPAMStorage) Delete

func (sqlis *SQLiteIPAMStorage) Delete(ctx context.Context, prefix types.Prefix) error

func (*SQLiteIPAMStorage) Get

func (sqlis *SQLiteIPAMStorage) Get(ctx context.Context, name string, parent types.Prefix) (types.Prefix, error)

func (*SQLiteIPAMStorage) GetChilds

func (sqlis *SQLiteIPAMStorage) GetChilds(ctx context.Context, prefix types.Prefix) ([]types.Prefix, error)

Jump to

Keyboard shortcuts

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