module

package
v0.0.0-...-5abfebf Latest Latest
Warning

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

Go to latest
Published: Nov 22, 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 Module

type Module struct {
	// ID defines the unique identifier.
	ID int `gorm:"primaryKey" json:"id" filter:"filterable"`

	// Name defines the unique name of the module.
	Name string `gorm:"uniqueIndex;not null" filter:"searchable;filterable"`

	// Type defines the type of the module.
	Type TypeModule `gorm:"not null" json:"type" filter:"filterable"`

	// Config defines the configuration of the module.
	// It is a JSON object that contains the configuration of the module.
	Config []byte

	// Audit fields
	trackable.CreatedBy
	CreatedAt time.Time `gorm:"autoCreateTime"`
	trackable.UpdatedBy
	UpdatedAt time.Time `gorm:"autoUpdateTime"`
}

func (*Module) BeforeCreate

func (u *Module) BeforeCreate(tx *gorm.DB) (err error)

func (*Module) BeforeUpdate

func (u *Module) BeforeUpdate(tx *gorm.DB) (err error)

type Store

type Store struct {
	data.Generic[Module]
}

Store struct manages interactions with authors store

func New

func New(db *gorm.DB) *Store

New creates a new Store struct

type TypeModule

type TypeModule string
const (
	// UndefinedType represents an undefined module type
	UndefinedType TypeModule = "undefined"
	// GitType represents a git module type
	GitType TypeModule = "git"
)

Jump to

Keyboard shortcuts

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