yaruzplatform

package
v0.0.0-...-4f702ff Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLimit = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvertiserRepository

type AdvertiserRepository struct {
	// contains filtered or unexported fields
}

AdvertiserRepository is a repository for the model entity

func NewAdvertiserRepository

func NewAdvertiserRepository(repository *repository) (*AdvertiserRepository, error)

New creates a new AdvertiserRepository

func (*AdvertiserRepository) Count

func (*AdvertiserRepository) Create

func (r *AdvertiserRepository) Create(ctx context.Context, obj *advertiser.Advertiser, langID uint) error

Create saves a new record in the database.

func (*AdvertiserRepository) Delete

func (r *AdvertiserRepository) Delete(ctx context.Context, id uint) error

Delete (soft) deletes a Maintenance record in the database.

func (*AdvertiserRepository) First

func (*AdvertiserRepository) Get

Get reads the album with the specified ID from the database.

func (*AdvertiserRepository) GetPropertyFinder

func (r *AdvertiserRepository) GetPropertyFinder() entity.PropertyFinder

func (*AdvertiserRepository) New

func (*AdvertiserRepository) NewEntityByEntityType

func (r *AdvertiserRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*AdvertiserRepository) Query

Query retrieves records with the specified offset and limit from the database.

func (*AdvertiserRepository) SetDefaultConditions

func (r *AdvertiserRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*AdvertiserRepository) Update

func (r *AdvertiserRepository) Update(ctx context.Context, obj *advertiser.Advertiser, langID uint) error

Update saves a changed Maintenance record in the database.

type AdvertisingCampaignRepository

type AdvertisingCampaignRepository struct {
	// contains filtered or unexported fields
}

AdvertisingCampaignRepository is a repository for the model entity

func NewAdvertisingCampaignRepository

func NewAdvertisingCampaignRepository(repository *repository) (*AdvertisingCampaignRepository, error)

New creates a new AdvertisingCampaignRepository

func (*AdvertisingCampaignRepository) Count

func (*AdvertisingCampaignRepository) Create

Create saves a new record in the database.

func (*AdvertisingCampaignRepository) Delete

Delete (soft) deletes a Maintenance record in the database.

func (*AdvertisingCampaignRepository) First

func (*AdvertisingCampaignRepository) Get

Get reads the album with the specified ID from the database.

func (*AdvertisingCampaignRepository) GetPropertyFinder

func (r *AdvertisingCampaignRepository) GetPropertyFinder() entity.PropertyFinder

func (*AdvertisingCampaignRepository) New

func (*AdvertisingCampaignRepository) NewEntityByEntityType

func (r *AdvertisingCampaignRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*AdvertisingCampaignRepository) Query

Query retrieves records with the specified offset and limit from the database.

func (*AdvertisingCampaignRepository) SetDefaultConditions

func (r *AdvertisingCampaignRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*AdvertisingCampaignRepository) Update

Update saves a changed Maintenance record in the database.

type IRepository

type IRepository interface{}

IRepository is an interface of repository

func GetRepository

func GetRepository(logger log.Logger, yaruzRepository yarus_platform.IPlatform, entity string) (repo IRepository, err error)

GetRepository return a repository

type OfferRepository

type OfferRepository struct {
	// contains filtered or unexported fields
}

OfferRepository is a repository for the model entity

func NewOfferRepository

func NewOfferRepository(repository *repository) (*OfferRepository, error)

New creates a new OfferRepository

func (*OfferRepository) Count

func (r *OfferRepository) Count(ctx context.Context, condition *selection_condition.SelectionCondition, langID uint) (uint, error)

func (*OfferRepository) Create

func (r *OfferRepository) Create(ctx context.Context, obj *offer.Offer, langID uint) error

Create saves a new record in the database.

func (*OfferRepository) Delete

func (r *OfferRepository) Delete(ctx context.Context, id uint) error

Delete (soft) deletes a Maintenance record in the database.

func (*OfferRepository) First

func (*OfferRepository) Get

func (r *OfferRepository) Get(ctx context.Context, id uint, langID uint) (*offer.Offer, error)

Get reads the album with the specified ID from the database.

func (*OfferRepository) GetPropertyFinder

func (r *OfferRepository) GetPropertyFinder() entity.PropertyFinder

func (*OfferRepository) New

func (r *OfferRepository) New(ctx context.Context) (*offer.Offer, error)

func (*OfferRepository) NewEntityByEntityType

func (r *OfferRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*OfferRepository) Query

Query retrieves records with the specified offset and limit from the database.

func (*OfferRepository) SetDefaultConditions

func (r *OfferRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*OfferRepository) Update

func (r *OfferRepository) Update(ctx context.Context, obj *offer.Offer, langID uint) error

Update saves a changed Maintenance record in the database.

type TaskRepository

type TaskRepository struct {
	// contains filtered or unexported fields
}

TaskRepository is a repository for the model entity

func NewTaskRepository

func NewTaskRepository(repository *repository) (*TaskRepository, error)

New creates a new TaskRepository

func (*TaskRepository) Count

func (*TaskRepository) Create

func (r *TaskRepository) Create(ctx context.Context, entity *task.Task) error

Create saves a new record in the database.

func (*TaskRepository) Delete

func (r *TaskRepository) Delete(ctx context.Context, id uint) error

Delete (soft) deletes a Maintenance record in the database.

func (*TaskRepository) First

func (r *TaskRepository) First(ctx context.Context, entity *task.Task) (*task.Task, error)

func (*TaskRepository) Get

func (r *TaskRepository) Get(ctx context.Context, id uint) (*task.Task, error)

Get reads the album with the specified ID from the database.

func (*TaskRepository) GetPropertyFinder

func (r *TaskRepository) GetPropertyFinder() entity.PropertyFinder

func (*TaskRepository) NewEntityByEntityType

func (r *TaskRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*TaskRepository) Query

Query retrieves the album records with the specified offset and limit from the database.

func (*TaskRepository) Save

func (r *TaskRepository) Save(ctx context.Context, entity *task.Task) error

Save update value in database, if the value doesn't have primary key, will insert it

func (*TaskRepository) SetDefaultConditions

func (r *TaskRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*TaskRepository) Update

func (r *TaskRepository) Update(ctx context.Context, entity *task.Task) error

Update saves a changed Maintenance record in the database.

type TgAccountRepository

type TgAccountRepository struct {
	// contains filtered or unexported fields
}

TgAccountRepository is a repository for the model entity

func NewTgAccountRepository

func NewTgAccountRepository(repository *repository) (*TgAccountRepository, error)

NewTgAccountRepository creates a new TgAccountRepository

func (*TgAccountRepository) Count

func (*TgAccountRepository) Create

func (r *TgAccountRepository) Create(ctx context.Context, obj *tg_account.TgAccount, langID uint) error

Create saves a new record in the database.

func (*TgAccountRepository) Delete

func (r *TgAccountRepository) Delete(ctx context.Context, id uint) error

Delete (soft) deletes a Maintenance record in the database.

func (*TgAccountRepository) First

func (*TgAccountRepository) Get

func (r *TgAccountRepository) Get(ctx context.Context, id uint, langID uint) (*tg_account.TgAccount, error)

Get reads the album with the specified ID from the database.

func (*TgAccountRepository) GetPropertyFinder

func (r *TgAccountRepository) GetPropertyFinder() entity.PropertyFinder

func (*TgAccountRepository) New

func (*TgAccountRepository) NewEntityByEntityType

func (r *TgAccountRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*TgAccountRepository) Query

Query retrieves records with the specified offset and limit from the database.

func (*TgAccountRepository) SetDefaultConditions

func (r *TgAccountRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*TgAccountRepository) Update

func (r *TgAccountRepository) Update(ctx context.Context, obj *tg_account.TgAccount, langID uint) error

Update saves a changed Maintenance record in the database.

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

UserRepository is a repository for the model entity

func NewUserRepository

func NewUserRepository(repository *repository, tgAccountRepository tg_account.Repository) (*UserRepository, error)

NewUserRepository creates a new UserRepository

func (*UserRepository) Count

func (r *UserRepository) Count(ctx context.Context, condition *selection_condition.SelectionCondition, langID uint) (uint, error)

func (*UserRepository) Create

func (r *UserRepository) Create(ctx context.Context, obj *user.User, langID uint) error

Create saves a new record in the database.

func (*UserRepository) Delete

func (r *UserRepository) Delete(ctx context.Context, id uint) error

Delete (soft) deletes a Maintenance record in the database.

func (*UserRepository) First

func (r *UserRepository) First(ctx context.Context, condition *selection_condition.SelectionCondition, langID uint) (*user.User, error)

func (*UserRepository) Get

func (r *UserRepository) Get(ctx context.Context, id uint, langID uint) (*user.User, error)

Get reads the album with the specified ID from the database.

func (*UserRepository) GetByTgAccount

func (r *UserRepository) GetByTgAccount(ctx context.Context, obj *tg_account.TgAccount, langID uint) (*user.User, error)

func (*UserRepository) GetPropertyFinder

func (r *UserRepository) GetPropertyFinder() entity.PropertyFinder

func (*UserRepository) GetTgAccount

func (r *UserRepository) GetTgAccount(ctx context.Context, obj *user.User, langID uint) (*tg_account.TgAccount, error)

func (*UserRepository) LangIDValidate

func (r *UserRepository) LangIDValidate(ctx context.Context, langID uint) error

func (*UserRepository) New

func (r *UserRepository) New(ctx context.Context) (*user.User, error)

func (*UserRepository) NewEntityByEntityType

func (r *UserRepository) NewEntityByEntityType(ctx context.Context, entityType string) (*entity.Entity, error)

func (*UserRepository) Query

func (r *UserRepository) Query(ctx context.Context, condition *selection_condition.SelectionCondition, langID uint) ([]user.User, error)

Query retrieves records with the specified offset and limit from the database.

func (*UserRepository) SetDefaultConditions

func (r *UserRepository) SetDefaultConditions(defaultConditions *selection_condition.SelectionCondition)

func (*UserRepository) Update

func (r *UserRepository) Update(ctx context.Context, obj *user.User, langID uint) error

Update saves a changed Maintenance record in the database.

Jump to

Keyboard shortcuts

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