service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTrainingRecord added in v0.0.3

func CreateTrainingRecord(ctx context.Context, trainingRecord *model.TrainingRecord) error

func CreateTraningItem

func CreateTraningItem(ctx context.Context, trainingItem *model.TrainingItem) error

func CreateUser added in v0.0.2

func CreateUser(ctx context.Context, user *model.User) error

func DeleteTrainingRecord added in v0.0.3

func DeleteTrainingRecord(ctx context.Context, trainingRecordId int, userId int) error

func DeleteTraningItem

func DeleteTraningItem(ctx context.Context, id int, userId int) error

func DeleteUser added in v0.0.2

func DeleteUser(ctx context.Context, id int) error

func GenerateToken added in v0.0.2

func GenerateToken(userId int) (string, error)

func GetTrainingRecord added in v0.0.3

func GetTrainingRecord(ctx context.Context, trainingRecordId int, userId int) (*model.TrainingRecord, error)

func GetTrainingRecords added in v0.0.3

func GetTrainingRecords(ctx context.Context, userId int) ([]*model.TrainingRecord, error)

func GetTraningItem

func GetTraningItem(ctx context.Context, id int, userId int) (*model.TrainingItem, error)

func GetTraningItems

func GetTraningItems(ctx context.Context, userId int) ([]*model.TrainingItem, error)

func GetUserByEmail added in v0.0.2

func GetUserByEmail(ctx context.Context, email string) (*model.User, error)

func GetUserById added in v0.0.2

func GetUserById(ctx context.Context, id int) (*model.User, error)

func GetUsers added in v0.0.2

func GetUsers(ctx context.Context) ([]*model.User, error)

func Login added in v0.0.2

func Login(ctx context.Context, email string, password string) (string, *model.SafeUser, error)

func UpdateTrainingRecord added in v0.0.3

func UpdateTrainingRecord(ctx context.Context, trainingRecord *model.TrainingRecord, userId int) error

func UpdateTraningItem

func UpdateTraningItem(ctx context.Context, trainingItem *model.TrainingItem, userId int) error

func UpdateUser added in v0.0.2

func UpdateUser(ctx context.Context, user *model.User) error

func ValidateToken added in v0.0.2

func ValidateToken(token string) (int, error)

Types

type TableBasics

type TableBasics struct {
	DynamoDbClient anytoreDynamodb.DynamoDBService
	TableName      string
}

func NewTableBasics

func NewTableBasics(tableName string) (*TableBasics, error)

Jump to

Keyboard shortcuts

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