v1

package
v0.0.0-...-f34edaa Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

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

func NewGroup

func NewGroup(db *sql.DB) *Group

func (*Group) FindByName

func (r *Group) FindByName(ctx context.Context, name string) (*models.Sgroup, error)

func (*Group) List

func (r *Group) List(ctx context.Context, match string) (models.SgroupSlice, error)

func (*Group) Upsert

func (r *Group) Upsert(ctx context.Context, record []string) error

type Host

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

func NewHost

func NewHost(db *sql.DB) *Host

func (*Host) FindByHostname

func (r *Host) FindByHostname(ctx context.Context, hostname string) (*models.Host, error)

func (*Host) List

func (r *Host) List(ctx context.Context, match string) (models.HostSlice, error)

func (*Host) ListByGroupID

func (r *Host) ListByGroupID(ctx context.Context, groupID int64) (models.HostSlice, error)

func (*Host) Upsert

func (r *Host) Upsert(ctx context.Context, record []string, zone string) error

type Policy

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

func NewPolicy

func NewPolicy(db *sql.DB) *Policy

func (*Policy) ListGroup

func (r *Policy) ListGroup(ctx context.Context) ([]types.PolicyByGroup, error)

func (*Policy) ListHost

func (r *Policy) ListHost(ctx context.Context) ([]types.PolicyByHost, error)

func (*Policy) Upsert

func (r *Policy) Upsert(ctx context.Context, record []string) error

Jump to

Keyboard shortcuts

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