gateway

package
v0.0.0-...-df3562f Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEnglishSentenceModel

func FromEnglishSentenceModel(model *libapi.EnglishSentencesModel) ([]byte, error)

func NewCocotolaAuthClient

func NewCocotolaAuthClient(httpClient HTTPClient, authEndpoint *url.URL, authUsername, authPassword string) service.CocotolaAuthClient

func NewTransactionManager

func NewTransactionManager(db *gorm.DB, rff RepositoryFactoryFunc) (service.TransactionManager, error)

func NewWorkbookRepository

func NewWorkbookRepository(db *gorm.DB) service.WorkbookRepository

func ToEnglishSentenceModel

func ToEnglishSentenceModel(content []byte) (*libapi.EnglishSentencesModel, error)

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type RepositoryFactory

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

func NewRepositoryFactory

func NewRepositoryFactory(ctx context.Context, dialect rslibgateway.DialectRDBMS, driverName string, db *gorm.DB, location *time.Location) (*RepositoryFactory, error)

func (*RepositoryFactory) NewWorkbookRepository

func (f *RepositoryFactory) NewWorkbookRepository(ctx context.Context) (service.WorkbookRepository, error)

type RepositoryFactoryFunc

type RepositoryFactoryFunc func(ctx context.Context, db *gorm.DB) (service.RepositoryFactory, error)

type WorkbookEntity

type WorkbookEntity struct {
	ID             int
	Version        int
	CreatedAt      time.Time
	UpdatedAt      time.Time
	CreatedBy      int
	UpdatedBy      int
	OrganizationID int
	Name           string
	ProblemType    string
	Lang2          string
	Description    string
	Content        string
}

func (*WorkbookEntity) TableName

func (e *WorkbookEntity) TableName() string

func (*WorkbookEntity) ToModel

Directories

Path Synopsis
usecase

Jump to

Keyboard shortcuts

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