repo

package
v0.0.0-...-19dc864 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package repo implements application outer layer logic. Each logic group in own file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaRepo

type KafkaRepo interface {
	SendMessage(ctx context.Context, topic string, key []byte, value interface{}) error
	AddConsumer(topic, groupID string, handler func(ctx context.Context, key, value []byte) error) error
	StartConsumer(ctx context.Context, topic string) error
	StartAllConsumers(ctx context.Context)
	Close() error

	// Control methods
	EnableProducer()
	DisableProducer()
	IsProducerEnabled() bool
	EnableConsumer()
	DisableConsumer()
	IsConsumerEnabled() bool
	GetStatus() map[string]interface{}
}

KafkaRepo -.

type NatsRepo

type NatsRepo interface {
	Publish(subject string, data []byte) error
	Subscribe(subject string, handler func(msg []byte)) (unsubscribe func() error, err error)
}

NatsRepo -.

type RedisRepo

type RedisRepo interface {
	SetValue(context.Context, entity.RedisValue) error
	GetValue(context.Context, string) (entity.RedisValue, error)
}

RedisRepo -.

type TranslationRepo

type TranslationRepo interface {
	Store(context.Context, models.TranslationModel) error
	GetHistory(context.Context) ([]entity.Translation, error)
}

TranslationRepo -.

type TranslationWebAPI

type TranslationWebAPI interface {
	Translate(entity.Translation) (entity.Translation, error)
}

TranslationWebAPI -.

type UserRepo

type UserRepo interface {
	Create(context.Context, models.UserModel) (entity.User, error)
	GetByID(context.Context, int64) (entity.User, error)
	GetByEmail(context.Context, string) (entity.User, error)
	Update(context.Context, models.UserModel) error
	Delete(context.Context, int64) error
	List(context.Context) ([]entity.User, error)
	// Database access methods
	GetBuilder() squirrel.StatementBuilderType
	GetPool() *pgxpool.Pool
}

UserRepo -.

Directories

Path Synopsis
request
request external api
request external api
response
response external api
response external api

Jump to

Keyboard shortcuts

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