historylog

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package account present full API functionality of the specific object

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionFromContext

func ActionFromContext(ctx context.Context) string

ActionFromContext returns action from context

func MessageFromContext

func MessageFromContext(ctx context.Context) string

MessageFromContext returns message from context

func WithAction

func WithAction(ctx context.Context, action string) context.Context

WithAction returns context with action

func WithMessage

func WithMessage(ctx context.Context, msg string) context.Context

WithMessage returns context with message

Types

type Filter

type Filter struct {
	ID          []uuid.UUID
	RequestID   []string
	Name        []string
	UserID      []uint64
	AccountID   []uint64
	ObjectID    []uint64
	ObjectIDStr []string
	ObjectType  []string
}

Filter of the objects list

func (*Filter) Query

func (filter *Filter) Query(query *gorm.DB) *gorm.DB

type Order

type Order struct {
	ID          model.Order
	RequestID   model.Order
	Name        model.Order
	UserID      model.Order
	AccountID   model.Order
	ObjectID    model.Order
	ObjectIDStr model.Order
	ObjectType  model.Order
	ActionAt    model.Order
}

func (*Order) Query

func (o *Order) Query(query *gorm.DB) *gorm.DB

type Repository

type Repository interface {
	Count(ctx context.Context, filter *Filter) (int64, error)
	FetchList(ctx context.Context, filter *Filter, order *Order, pagination *repository.Pagination) ([]*model.HistoryAction, error)
}

Repository of access to the changelog

type Usecase

type Usecase interface {
	Count(ctx context.Context, filter *Filter) (int64, error)
	FetchList(ctx context.Context, filter *Filter, order *Order, pagination *repository.Pagination) ([]*model.HistoryAction, error)
}

Usecase of the changelog

Directories

Path Synopsis
delivery
middleware
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package repository implements methods of working with the repository objects
Package repository implements methods of working with the repository objects
Package usecase account implementation
Package usecase account implementation

Jump to

Keyboard shortcuts

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