Documentation ¶
Index ¶
- Constants
- Variables
- type Apple
- type AppleConnection
- type AppleEdge
- type AppleVariety
- type AscOrDesc
- type BaseModel
- type Claims
- type ConnectionInput
- type Filter
- type FilterInput
- type HandlerDef
- type IAuth
- type IGenericRepo
- type IQueue
- type ISearch
- type ISomeService
- type IWorker
- type JWT
- type LoadersString
- type LoginInput
- type Modeler
- type Operator
- type PageInfo
- type Role
- type Services
- type User
Constants ¶
View Source
const LoadersKey = LoadersString("dataloaders")
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type AppleConnection ¶
type AppleVariety ¶
type AppleVariety string
const ( Fuji AppleVariety = "FUJI" Gala AppleVariety = "GALA" Honeycrisp AppleVariety = "HONEYCRISP" GoldenDelicious AppleVariety = "GOLDEN_DELICIOUS" RedDelicious AppleVariety = "RED_DELICIOUS" GrannySmith AppleVariety = "GRANNY_SMITH" Braeburn AppleVariety = "BRAEBURN" Jonagold AppleVariety = "JONAGOLD" CrippsPink AppleVariety = "CRIPPS_PINK" McIntosh AppleVariety = "MCINTOSH" Empire AppleVariety = "EMPIRE" Jonathan AppleVariety = "JONATHAN" Cortland AppleVariety = "CORTLAND" Winesap AppleVariety = "WINESAP" Ambrosia AppleVariety = "AMBROSIA" CosmicCrisp AppleVariety = "COSMIC_CRISP" Envy AppleVariety = "ENVY" Jazz AppleVariety = "JAZZ" )
type BaseModel ¶
type ConnectionInput ¶
type FilterInput ¶
type HandlerDef ¶
type HandlerDef interface { Graphql(repo any) gin.HandlerFunc Playground() gin.HandlerFunc SomeWebhookHandler(c *gin.Context, e IWorker) }
type IAuth ¶
type IAuth interface { Login(ctx context.Context, li LoginInput) (*JWT, error) Signup(ctx context.Context, newuser User, password string) (*JWT, error) RefreshToken(ctx context.Context, jwt JWT) (*JWT, error) GenerateToken(ctx context.Context, email string, duration time.Duration) (string, error) ValidateToken(ctx context.Context, tokenStr string) (*Claims, error) CurrentUser(ctx context.Context) (*User, error) SetCurrentUser(ctx context.Context, user *User) context.Context }
type IGenericRepo ¶
type IGenericRepo[T any] interface { Create(entity *T) (*T, error) Update(entity *T) (*T, error) Archive(entity *T) error // soft delete Delete(entity *T) error // hard delete ListBy(filters []Filter, preloads ...string) ([]*T, error) FindBy(filters []Filter, preloads ...string) (*T, error) FuzzyFindBy(key string, value any) ([]*T, error) Connection(tx *gorm.DB, tableName string, filter []FilterInput, sortBy string, direction AscOrDesc, limit int, after int) ([]*T, *PageInfo, error) }
type IQueue ¶
type IQueue interface { Clear(ctx context.Context, name string) ([]*asynq.TaskInfo, error) TogglePause(ctx context.Context, name string) error StartServer(ctx context.Context, workPkg IWorker) Get(ctx context.Context, name string) (*asynq.QueueInfo, error) Enqueue(ctx context.Context, task *asynq.Task, opts ...asynq.Option) (*asynq.TaskInfo, error) RunTask(ctx context.Context, queueName string, taskId string) error DeleteTask(ctx context.Context, queueName string, taskId string) error ArchiveTask(ctx context.Context, queueName string, taskId string) error }
type ISearch ¶
type ISearch interface {
Apples(ctx context.Context, input *ConnectionInput) (*AppleConnection, error)
}
type ISomeService ¶
type LoadersString ¶
type LoadersString string
type LoginInput ¶
type Operator ¶
type Operator string
const ( OperatorUnset Operator = "" OperatorGreaterThan Operator = ">" OperatorLessThan Operator = "<" OperatorGreaterThanOrEqual Operator = ">=" OperatorLessThanOrEqual Operator = "<=" OperatorEqual Operator = "=" OperatorIn Operator = "IN" OperatorIncludes Operator = "@>" OperatorILike Operator = "ILIKE" )
Click to show internal directories.
Click to hide internal directories.