manager

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Create(ctx context.Context, badge *models.Badge) (*models.Badge, error)
	Update(ctx context.Context, badge *models.Badge) (*models.Badge, error)

	UpdateByName(ctx context.Context, resourceType string,
		resourceID uint, name string, badge *models.Badge) (*models.Badge, error)
	List(ctx context.Context, resourceType string, resourceID uint) ([]*models.Badge, error)
	Get(ctx context.Context, id uint) (*models.Badge, error)
	GetByName(ctx context.Context, resourceType string, resourceID uint, name string) (*models.Badge, error)
	Delete(ctx context.Context, id uint) error
	DeleteByName(ctx context.Context, resourceType string, resourceID uint, name string) error
	DeleteByResource(ctx context.Context, resourceType string, resourceID uint) error
}

func New

func New(db *gorm.DB) Manager

Jump to

Keyboard shortcuts

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