Documentation
¶
Index ¶
Constants ¶
View Source
const COLUMN_CONTENT = "content"
View Source
const COLUMN_CREATED_AT = "created_at"
View Source
const COLUMN_ENTITY_ID = "entity_id"
View Source
const COLUMN_ENTITY_TYPE = "entity_type"
View Source
const COLUMN_ID = "id"
View Source
const COLUMN_SOFT_DELETED_AT = "soft_deleted_at"
View Source
const COLUMN_UPDATED_AT = "updated_at"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewStoreOptions ¶
type NewStoreOptions struct { TableName string DB *sql.DB AutomigrateEnabled bool DebugEnabled bool Logger *slog.Logger }
NewStoreOptions define the options for creating a new session store
type StoreInterface ¶
type StoreInterface interface { AutoMigrate() error EnableDebug(debug bool) VersionCreate(context context.Context, version VersionInterface) error VersionFindByID(context context.Context, versionID string) (VersionInterface, error) VersionList(context context.Context, query VersionQueryInterface) ([]VersionInterface, error) VersionUpdate(context context.Context, version VersionInterface) error VersionDelete(context context.Context, version VersionInterface) error VersionDeleteByID(context context.Context, versionID string) error VersionSoftDelete(context context.Context, version VersionInterface) error VersionSoftDeleteByID(context context.Context, versionID string) error }
func NewStore ¶
func NewStore(opts NewStoreOptions) (StoreInterface, error)
NewStore creates a new session store
type VersionInterface ¶
type VersionInterface interface { Data() map[string]string DataChanged() map[string]string MarkAsNotDirty() ID() string SetID(id string) VersionInterface EntityType() string SetEntityType(entityType string) VersionInterface EntityID() string SetEntityID(entityID string) VersionInterface Content() string SetContent(content string) VersionInterface CreatedAt() string SetCreatedAt(createdAt string) VersionInterface SoftDeletedAt() string SetSoftDeletedAt(softDeletedAt string) VersionInterface }
func NewVersion ¶
func NewVersion() VersionInterface
func NewVersionFromExistingData ¶
func NewVersionFromExistingData(data map[string]string) VersionInterface
type VersionQueryInterface ¶
type VersionQueryInterface interface { Validate() error Columns() []string SetColumns(columns []string) VersionQueryInterface HasCountOnly() bool IsCountOnly() bool SetCountOnly(countOnly bool) VersionQueryInterface HasID() bool ID() string SetID(id string) VersionQueryInterface HasEntityID() bool EntityID() string SetEntityID(entityID string) VersionQueryInterface HasEntityType() bool EntityType() string SetEntityType(entityType string) VersionQueryInterface HasOffset() bool Offset() int64 SetOffset(offset int64) VersionQueryInterface HasLimit() bool Limit() int SetLimit(limit int) VersionQueryInterface HasSortOrder() bool SortOrder() string SetSortOrder(sortOrder string) VersionQueryInterface HasOrderBy() bool OrderBy() string SetOrderBy(orderBy string) VersionQueryInterface HasSoftDeletedIncluded() bool SoftDeletedIncluded() bool SetSoftDeletedIncluded(includeSoftDeleted bool) VersionQueryInterface }
func NewVersionQuery ¶
func NewVersionQuery() VersionQueryInterface
Click to show internal directories.
Click to hide internal directories.