tag_repository

package
v0.0.0-...-7a62f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sqlx.DB) (repository.Tag, error)

Types

type TagRepo

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

func (*TagRepo) AddToResource

func (r *TagRepo) AddToResource(ctx context.Context, t *tag.Tag, id string, typee tag.ResourceType) error

func (*TagRepo) DeleteTagFromResource

func (r *TagRepo) DeleteTagFromResource(ctx context.Context, key tag.TagKey, rid string) error

func (*TagRepo) ListForResource

func (r *TagRepo) ListForResource(ctx context.Context, rid string) ([]*tag.Tag, error)

type TagSql

type TagSql struct {
	Identifier         int    `db:"id"`
	ResourceIdentifier string `db:"resource_identifier"`
	ResourceType       string `db:"resource_type"`
	Key                string `db:"tag_key"`
	Value              string `db:"tag_value"`
}

func (*TagSql) ToModel

func (t *TagSql) ToModel() (*tag.Tag, error)

Jump to

Keyboard shortcuts

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