statistic

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package statistic present full API functionality of the specific object

Package statistic present full API functionality of the specific object

Index

Constants

View Source
const (
	RBACStatisticObjectName = `statistic`
)

Variables

View Source
var (
	RBACStatisticObject = acl.RBACType{
		ResourceName: RBACStatisticObjectName,
	}
)

Functions

func WithGroup

func WithGroup(fields ...Key) *repository.GroupOption

Types

type Condition

type Condition struct {
	Key   Key
	Op    Operation
	Value []any
}

func (*Condition) PrepareQuery

func (cond *Condition) PrepareQuery(query *gorm.DB) *gorm.DB

type Filter

type Filter struct {
	Conditions []*Condition
	StartDate  time.Time
	EndDate    time.Time
}

Filter of the objects list

func (*Filter) PrepareQuery

func (fl *Filter) PrepareQuery(query *gorm.DB) *gorm.DB

type Key

type Key string
const (
	KeyUndefined    Key = "undefined"
	KeyDatemark     Key = "datemark"
	KeyTimemark     Key = "timemark"
	KeySourceID     Key = "source_id"
	KeyPlatformType Key = "platform_type"
	KeyDomain       Key = "domain"
	KeyAppID        Key = "app_id"
	KeyZoneID       Key = "zone_id"
	KeyFormatID     Key = "format_id"
	KeyCarrierID    Key = "carrier_id"
	KeyCountry      Key = "country"
	KeyLanguage     Key = "language"
	KeyIP           Key = "ip"
	KeyDeviceID     Key = "device_id"
	KeyDeviceType   Key = "device_type"
	KeyOsID         Key = "os_id"
	KeyBrowserID    Key = "browser_id"
)

func (Key) String

func (key Key) String() string

type ListOrder

type ListOrder struct {
}

ListOrder of the objects list

func (*ListOrder) PrepareQuery

func (ol *ListOrder) PrepareQuery(query *gorm.DB) *gorm.DB

type Operation

type Operation int32
const (
	ConditionUndefined Operation = iota
	ConditionEq
	ConditionNotEq
	ConditionGt
	ConditionGtEq
	ConditionLt
	ConditionLtEq
	ConditionIn
	ConditionNotIn
	ConditionBetween
	ConditionNotBetween
	ConditionLike
	ConditionNotLike
	ConditionIsNull
	ConditionIsNotNull
)

type Option

type Option = repository.QOption

List select options

type Options

type Options = repository.ListOptions

List select options

type Repository

type Repository interface {
	Statistic(ctx context.Context, opts ...Option) ([]*models.StatisticAdItem, error)
	Count(ctx context.Context, opts ...Option) (int64, error)
}

Repository of access to the statistic

type Usecase

type Usecase interface {
	Statistic(ctx context.Context, opts ...Option) ([]*models.StatisticAdItem, error)
	Count(ctx context.Context, opts ...Option) (int64, error)
}

Usecase of access to the statistic

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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