Documentation ¶
Index ¶
- Variables
- func CreateNewToken(userIdHex string, UserModel *model.Model, roles []string) (string, error)
- func GRPCCallWithBody[InputT any, ClientT interface{}, OutputT proto.Message](serviceUrl string, clientConstructor func(cc grpc.ClientConnInterface) ClientT, ...) func(ctx *fiber.Ctx) error
- func GRPCCallWithQueryParams[InputT any, ClientT interface{}, OutputT proto.Message](serviceUrl string, clientConstructor func(cc grpc.ClientConnInterface) ClientT, ...) func(ctx *fiber.Ctx) error
- func GetRoleNames(RoleMappingModel *model.Model, userIdHex string, userId primitive.ObjectID) ([]string, error)
- func InitAndServe(options Options, onBoot ...func(app *WeStack))
- func SendInternalError(ctx *fiber.Ctx, err error) error
- func UpsertUserRoles(app *WeStack, userId interface{}, roles []string, ...) error
- func UpsertUserWithRoles(app *WeStack, userToUpsert UserWithRoles, eventContext *model.EventContext) (user *model.Instance, err error)
- type LoginBody
- type Options
- type UniqueNessRestriction
- type UpserRequestBody
- type UserWithRoles
- type WeStack
- func (app *WeStack) Boot(customRoutesCallbacks ...func(app *WeStack))
- func (app *WeStack) FindDatasource(dsName string) (*datasource.Datasource, error)
- func (app *WeStack) FindModel(modelName string) (*model.Model, error)
- func (app *WeStack) FindModelsWithClass(modelClass string) (foundModels []*model.Model)
- func (app *WeStack) Logger() wst.ILogger
- func (app *WeStack) Middleware(handler fiber.Handler)
- func (app *WeStack) Start() error
- func (app *WeStack) Stop() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidEmailRegex = regexp.MustCompile(`^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$`)
Functions ¶
func CreateNewToken ¶ added in v1.8.3
func GRPCCallWithBody ¶ added in v1.4.1
func GRPCCallWithBody[InputT any, ClientT interface{}, OutputT proto.Message](serviceUrl string, clientConstructor func(cc grpc.ClientConnInterface) ClientT, clientMethod func(ClientT, context.Context, *InputT, ...grpc.CallOption) (OutputT, error), timeoutSeconds ...float32) func(ctx *fiber.Ctx) error
func GRPCCallWithQueryParams ¶ added in v1.4.1
func GRPCCallWithQueryParams[InputT any, ClientT interface{}, OutputT proto.Message](serviceUrl string, clientConstructor func(cc grpc.ClientConnInterface) ClientT, clientMethod func(ClientT, context.Context, *InputT, ...grpc.CallOption) (OutputT, error), timeoutSeconds ...float32) func(ctx *fiber.Ctx) error
func GetRoleNames ¶ added in v1.8.3
func InitAndServe ¶ added in v1.3.6
func SendInternalError ¶ added in v1.7.2
func UpsertUserRoles ¶ added in v1.7.0
func UpsertUserRoles(app *WeStack, userId interface{}, roles []string, eventContext *model.EventContext) error
func UpsertUserWithRoles ¶ added in v1.5.48
func UpsertUserWithRoles(app *WeStack, userToUpsert UserWithRoles, eventContext *model.EventContext) (user *model.Instance, err error)
Types ¶
type UniqueNessRestriction ¶ added in v1.8.0
type UpserRequestBody ¶ added in v1.7.0
type UpserRequestBody struct {
Roles []string `json:"roles"`
}
type UserWithRoles ¶ added in v1.5.48
type WeStack ¶
type WeStack struct { Server *fiber.App Viper *viper.Viper DsViper *viper.Viper Options Options Bson wst.BsonOptions // contains filtered or unexported fields }
func (*WeStack) FindDatasource ¶ added in v1.2.94
func (app *WeStack) FindDatasource(dsName string) (*datasource.Datasource, error)
func (*WeStack) FindModelsWithClass ¶ added in v1.5.48
func (*WeStack) Middleware ¶ added in v1.3.6
func (app *WeStack) Middleware(handler fiber.Handler)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.