service

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectSQLDb

func ConnectSQLDb(ctx context.Context, config *config.Config, sugar *zap.SugaredLogger) (*gorm.DB, error)

func MigrateDown

func MigrateDown(db *gorm.DB) error

func MigrateUp

func MigrateUp(db *gorm.DB) error

func MigrateUpWithConfig added in v0.16.0

func MigrateUpWithConfig(db *gorm.DB, cfg *config.Config) error

Types

type Heartbeat

type Heartbeat struct {
	relational.UUIDModel

	UUID      uuid.UUID `gorm:"index"`
	CreatedAt time.Time `gorm:"index"`
}

type ListResponse

type ListResponse[T any] struct {
	Data       []T   `json:"data"`
	Total      int64 `json:"total"`
	Page       int   `json:"page"`
	Limit      int   `json:"limit"`
	TotalPages int   `json:"totalPages"`
}

ListResponse represents a paginated response structure

func NewListResponse

func NewListResponse[T any](data []T, total int64, page, limit int) *ListResponse[T]

NewListResponse creates a new paginated list response

type PaginationConfig

type PaginationConfig struct {
	DefaultLimit int
	MaxLimit     int
}

PaginationConfig holds configuration for pagination behavior

func NewPaginationConfig

func NewPaginationConfig() *PaginationConfig

NewPaginationConfig creates a new pagination configuration with sensible defaults

func (*PaginationConfig) ParseParams

func (cfg *PaginationConfig) ParseParams(ctx *echo.Context) (*PaginationParams, error)

ParseParams extracts and validates pagination parameters from echo context

type PaginationParams

type PaginationParams struct {
	Page   int
	Limit  int
	Offset int
}

PaginationParams holds parsed pagination parameters

Directories

Path Synopsis
Package leverage is the neutral home for the cross-SSP leveraged-authorization projection and aggregation.
Package leverage is the neutral home for the cross-SSP leveraged-authorization projection and aggregation.
agentcfg
Package agentcfg stores and serves agent remote-configuration revisions (append-only overlays per agent) and the agent instances that report against them.
Package agentcfg stores and serves agent remote-configuration revisions (append-only overlays per agent) and the agent instances that report against them.
artifacts
Package artifacts stores content-addressed policy evaluation artifacts.
Package artifacts stores content-addressed policy evaluation artifacts.
sspscope
Package sspscope stores an SSP's scope: the labels that identify the SSP's evidence.
Package sspscope stores an SSP's scope: the labels that identify the SSP's evidence.
sspservice
Package sspservice creates System Security Plans and binds profiles to them.
Package sspservice creates System Security Plans and binds profiles to them.
ssptemplates
Package ssptemplates stores SSP templates: rules that create one SSP per distinct combination of key label values in the latest evidence and keep its scope up to date.
Package ssptemplates stores SSP templates: rules that create one SSP per distinct combination of key label values in the latest evidence and keep its scope up to date.
subjects
Package subjects lists the entities evidence can name as its subject: defined components, SSP system components, parties and users.
Package subjects lists the entities evidence can name as its subject: defined components, SSP system components, parties and users.
sso

Jump to

Keyboard shortcuts

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