Documentation ¶
Index ¶
Constants ¶
View Source
const ( TraceIdKeyContextStr = "traceId" ErrInvalidTokenMessage = "invalid token" ErrInvalidTokenCode = "INVALID_TOKEN" HeaderSecret = "secret" EnvServiceSecret = "SERVICE_SECRET" EnvJWTSigningKey = "JWT_SIGNING_KEY" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HandlerCRUD ¶
type HandlerCRUD interface { ReadHandler WriteHandler }
type ReadHandler ¶
type ReadRepo ¶
type ReadRepo interface { GetList(ctx context.Context, opts *database.QueryOpts) error GetDetail(ctx context.Context, opts *database.QueryOpts) error GetDetailById(ctx context.Context, resultStruct interface{}, id interface{}, optionalTableName ...string) error Count(ctx context.Context, reqData *database.TableRequest, tableName ...string) (totalData, totalFiltered int, err error) }
type UsecaseCRUD ¶
type UsecaseCRUD interface { GetList(ctx context.Context, requestData interface{}) (*database.SelectResponse, error) GetDetailById(ctx context.Context, id interface{}) (*database.SelectResponse, error) Insert(ctx context.Context, data interface{}) (*database.CUDResponse, error) Update(ctx context.Context, data interface{}) (*database.CUDResponse, error) Delete(ctx context.Context, id interface{}) (*database.CUDResponse, error) }
type WriteHandler ¶
type WriteRepo ¶
type WriteRepo interface { Insert(ctx context.Context, data interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) BulkInsert(ctx context.Context, data interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) BulkUpdate(ctx context.Context, data interface{}, condition map[string][]interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) Update(ctx context.Context, data interface{}, condition map[string]interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) Upsert(ctx context.Context, data interface{}, condition map[string]interface{}, opts ...interface{}) (*database.CUDResponse, error) UpdateById(ctx context.Context, data interface{}, id interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) Delete(ctx context.Context, condition map[string]interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) DeleteById(ctx context.Context, id interface{}, trx ...*sqlx.Tx) (*database.CUDResponse, error) }
Click to show internal directories.
Click to hide internal directories.