repository

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	// Offset is the number of items to skip.
	Offset int
	// Limit is the maximum number of items to return.
	Limit int
	// Keyword is the keyword to search for.
	Keyword string
}

Query represents the query criteria for a database access.

type SystemConfigRepository

type SystemConfigRepository interface {
	// Create creates a new system config.
	Create(ctx context.Context, systemConfig *entity.SystemConfig) error
	// Delete deletes a system config by its ID.
	Delete(ctx context.Context, id uint) error
	// Update updates an existing system config.
	Update(ctx context.Context, systemConfig *entity.SystemConfig) error
	// Get retrieves a system config by its ID.
	Get(ctx context.Context, id uint) (*entity.SystemConfig, error)
	// Find returns a list of specified system config.
	Find(ctx context.Context, query Query) ([]*entity.SystemConfig, error)
	// Count returns the total of system configs.
	Count(ctx context.Context) (int, error)
}

SystemConfigRepository is an interface that defines the repository operations for system config. It follows the principles of domain-driven design (DDD).

Jump to

Keyboard shortcuts

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