modules

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphQLInterface

type GraphQLInterface interface {
	GetDBAlias(ctx context.Context, field *ast.Field, token string, store utils.M) (string, error)
	ExecGraphQLQuery(ctx context.Context, req *model.GraphQLRequest, token string, cb model.GraphQLCallback)
}

GraphQLInterface is used to mock the graphql module

type Module

type Module struct {

	// Global Modules
	GlobalMods *global.Global

	// Managers
	Managers *managers.Managers
	// contains filtered or unexported fields
}

Module is an object that sets up the modules

func (*Module) SetDatabaseConfig

func (m *Module) SetDatabaseConfig(ctx context.Context, projectID string, databaseConfigs config.DatabaseConfigs, schemaConfigs config.DatabaseSchemas, ruleConfigs config.DatabaseRules, prepConfigs config.DatabasePreparedQueries) error

SetDatabaseConfig sets the config of db, auth, schema and realtime modules

func (*Module) SetDatabasePreparedQueryConfig

func (m *Module) SetDatabasePreparedQueryConfig(ctx context.Context, prepConfigs config.DatabasePreparedQueries) error

SetDatabasePreparedQueryConfig set prepared config of database moudle

func (*Module) SetDatabaseRulesConfig

func (m *Module) SetDatabaseRulesConfig(ctx context.Context, projectID string, ruleConfigs config.DatabaseRules) error

SetDatabaseRulesConfig set database rules of db module

func (*Module) SetDatabaseSchemaConfig

func (m *Module) SetDatabaseSchemaConfig(ctx context.Context, projectID string, schemaConfigs config.DatabaseSchemas) error

SetDatabaseSchemaConfig sets database schema config

func (*Module) SetEventingConfig

func (m *Module) SetEventingConfig(ctx context.Context, projectID string, eventingConfig *config.EventingConfig, secureObj config.EventingRules, eventingSchemas config.EventingSchemas, eventingTriggers config.EventingTriggers) error

SetEventingConfig sets the config of eventing module

func (*Module) SetEventingRuleConfig

func (m *Module) SetEventingRuleConfig(ctx context.Context, secureObj config.EventingRules) error

SetEventingRuleConfig sets the config of eventing module

func (*Module) SetEventingSchemaConfig

func (m *Module) SetEventingSchemaConfig(ctx context.Context, eventingSchemas config.EventingSchemas) error

SetEventingSchemaConfig sets the config of eventing module

func (*Module) SetEventingTriggerConfig

func (m *Module) SetEventingTriggerConfig(ctx context.Context, eventingTriggers config.EventingTriggers) error

SetEventingTriggerConfig sets the config of eventing module

func (*Module) SetFileStoreConfig

func (m *Module) SetFileStoreConfig(ctx context.Context, projectID string, fileStore *config.FileStoreConfig) error

SetFileStoreConfig sets the config of auth and filestore modules

func (*Module) SetFileStoreSecurityRuleConfig

func (m *Module) SetFileStoreSecurityRuleConfig(ctx context.Context, _ string, fileStoreRules config.FileStoreRules)

SetFileStoreSecurityRuleConfig sets the config of auth and filestore modules

func (*Module) SetIngressGlobalRouteConfig

func (m *Module) SetIngressGlobalRouteConfig(ctx context.Context, _ string, c *config.GlobalRoutesConfig) error

SetIngressGlobalRouteConfig set config of routing module

func (*Module) SetIngressRouteConfig

func (m *Module) SetIngressRouteConfig(ctx context.Context, projectID string, routes config.IngressRoutes) error

SetIngressRouteConfig set the config of routing module

func (*Module) SetInitialProjectConfig

func (m *Module) SetInitialProjectConfig(ctx context.Context, projects config.Projects) error

SetInitialProjectConfig sets the config all modules

func (*Module) SetLetsencryptConfig

func (m *Module) SetLetsencryptConfig(ctx context.Context, projectID string, c *config.LetsEncrypt) error

SetLetsencryptConfig set the config of letsencrypt module

func (*Module) SetProjectConfig

func (m *Module) SetProjectConfig(ctx context.Context, p *config.ProjectConfig) error

SetProjectConfig set project config

func (*Module) SetRemoteServiceConfig

func (m *Module) SetRemoteServiceConfig(ctx context.Context, projectID string, services config.Services) error

SetRemoteServiceConfig set config of functions module

func (*Module) SetUsermanConfig

func (m *Module) SetUsermanConfig(ctx context.Context, _ string, auth config.Auths) error

SetUsermanConfig set the config of the userman module

type Modules

type Modules struct {

	// Global Modules
	GlobalMods *global.Global

	// Managers
	Managers *managers.Managers
	// contains filtered or unexported fields
}

Modules is an object that sets up the modules

func New

func New(_, clusterID, nodeID string, managers *managers.Managers, globalMods *global.Global) (*Modules, error)

New creates a new modules instance

func (*Modules) Auth

func (m *Modules) Auth(projectID string) (*auth.Module, error)

Auth returns the auth module

func (*Modules) Caching

func (m *Modules) Caching() *caching.Cache

Caching returns the caching module

func (*Modules) DB

func (m *Modules) DB(projectID string) (*crud.Module, error)

DB returns the auth module

func (*Modules) Delete

func (m *Modules) Delete(projectID string)

Delete the project

func (*Modules) Eventing

func (m *Modules) Eventing(projectID string) (*eventing.Module, error)

Eventing returns the auth module

func (*Modules) File

func (m *Modules) File(projectID string) (*filestore.Module, error)

File returns the auth module

func (*Modules) Functions

func (m *Modules) Functions(projectID string) (*functions.Module, error)

Functions returns the auth module

func (*Modules) GetAuthModuleForSyncMan

func (m *Modules) GetAuthModuleForSyncMan(projectID string) (model.AuthSyncManInterface, error)

GetAuthModuleForSyncMan returns auth module for sync manager

func (*Modules) GetSchemaModuleForSyncMan

func (m *Modules) GetSchemaModuleForSyncMan(projectID string) (model.SchemaEventingInterface, error)

GetSchemaModuleForSyncMan returns schema module for sync manager

func (*Modules) GraphQL

func (m *Modules) GraphQL(projectID string) (GraphQLInterface, error)

GraphQL returns the auth module

func (*Modules) LetsEncrypt

func (m *Modules) LetsEncrypt() *letsencrypt.LetsEncrypt

LetsEncrypt returns the letsencrypt module

func (*Modules) Realtime

func (m *Modules) Realtime(projectID string) (RealtimeInterface, error)

Realtime returns the auth module

func (*Modules) Routing

func (m *Modules) Routing() *routing.Routing

Routing returns the routing module

func (*Modules) Schema

func (m *Modules) Schema(projectID string) (*schema.Schema, error)

Schema returns the auth module

func (*Modules) SetDatabaseConfig

func (m *Modules) SetDatabaseConfig(ctx context.Context, projectID string, databaseConfigs config.DatabaseConfigs, schemaConfigs config.DatabaseSchemas, ruleConfigs config.DatabaseRules, prepConfigs config.DatabasePreparedQueries) error

SetDatabaseConfig sets the config of db, auth, schema and realtime modules

func (*Modules) SetDatabasePreparedQueryConfig

func (m *Modules) SetDatabasePreparedQueryConfig(ctx context.Context, projectID string, prepConfigs config.DatabasePreparedQueries) error

SetDatabasePreparedQueryConfig set prepared config of database moudle

func (*Modules) SetDatabaseRulesConfig

func (m *Modules) SetDatabaseRulesConfig(ctx context.Context, projectID string, ruleConfigs config.DatabaseRules) error

SetDatabaseRulesConfig set database rules of db module

func (*Modules) SetDatabaseSchemaConfig

func (m *Modules) SetDatabaseSchemaConfig(ctx context.Context, projectID string, schemaConfigs config.DatabaseSchemas) error

SetDatabaseSchemaConfig sets database schema config

func (*Modules) SetEventingConfig

func (m *Modules) SetEventingConfig(ctx context.Context, projectID string, eventingConfig *config.EventingConfig, secureObj config.EventingRules, eventingSchemas config.EventingSchemas, eventingTriggers config.EventingTriggers) error

SetEventingConfig sets the config of eventing module

func (*Modules) SetEventingRuleConfig

func (m *Modules) SetEventingRuleConfig(ctx context.Context, projectID string, secureObj config.EventingRules) error

SetEventingRuleConfig sets the config of eventing module

func (*Modules) SetEventingSchemaConfig

func (m *Modules) SetEventingSchemaConfig(ctx context.Context, projectID string, eventingSchemas config.EventingSchemas) error

SetEventingSchemaConfig sets the config of eventing module

func (*Modules) SetEventingTriggerConfig

func (m *Modules) SetEventingTriggerConfig(ctx context.Context, projectID string, eventingTriggers config.EventingTriggers) error

SetEventingTriggerConfig sets the config of eventing module

func (*Modules) SetFileStoreConfig

func (m *Modules) SetFileStoreConfig(ctx context.Context, projectID string, fileStore *config.FileStoreConfig) error

SetFileStoreConfig sets the config of auth and filestore modules

func (*Modules) SetFileStoreSecurityRuleConfig

func (m *Modules) SetFileStoreSecurityRuleConfig(ctx context.Context, projectID string, fileStoreRules config.FileStoreRules) error

SetFileStoreSecurityRuleConfig sets the config of auth and filestore modules

func (*Modules) SetIngressGlobalRouteConfig

func (m *Modules) SetIngressGlobalRouteConfig(ctx context.Context, projectID string, c *config.GlobalRoutesConfig) error

SetIngressGlobalRouteConfig set config of routing module

func (*Modules) SetIngressRouteConfig

func (m *Modules) SetIngressRouteConfig(ctx context.Context, projectID string, routes config.IngressRoutes) error

SetIngressRouteConfig set the config of routing module

func (*Modules) SetInitialProjectConfig

func (m *Modules) SetInitialProjectConfig(ctx context.Context, projects config.Projects) error

SetInitialProjectConfig sets the config all modules

func (*Modules) SetLetsencryptConfig

func (m *Modules) SetLetsencryptConfig(ctx context.Context, projectID string, c *config.LetsEncrypt) error

SetLetsencryptConfig set the config of letsencrypt module

func (*Modules) SetProjectConfig

func (m *Modules) SetProjectConfig(ctx context.Context, config *config.ProjectConfig) error

SetProjectConfig sets the config all modules

func (*Modules) SetRemoteServiceConfig

func (m *Modules) SetRemoteServiceConfig(ctx context.Context, projectID string, services config.Services) error

SetRemoteServiceConfig set config of functions module

func (*Modules) SetUsermanConfig

func (m *Modules) SetUsermanConfig(ctx context.Context, projectID string, auth config.Auths) error

SetUsermanConfig set the config of the userman module

func (*Modules) User

func (m *Modules) User(projectID string) (*userman.Module, error)

User returns the auth module

type RealtimeInterface

type RealtimeInterface interface {
	RemoveClient(clientID string)
	Subscribe(clientID string, data *model.RealtimeRequest, sendFeed model.SendFeed) ([]*model.FeedData, error)
	Unsubscribe(ctx context.Context, data *model.RealtimeRequest, clientID string) error

	HandleRealtimeEvent(ctxRoot context.Context, eventDoc *model.CloudEventPayload) error
	ProcessRealtimeRequests(ctx context.Context, eventDoc *model.CloudEventPayload) error
}

RealtimeInterface is used to mock the realtime module

Jump to

Keyboard shortcuts

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