Documentation
¶
Index ¶
- func CreateAuth(server *Server) (models.Auth, error)
- func CreateStripeService(server *Server, auth models.Auth) (*stripeService, error)
- func RegisterAuthService(server *Server, auth models.Auth, adminRoles string) error
- func RegisterStripeService(server *Server, auth models.Auth) error
- func ServeStaticFiles(port int, mappings []string)
- func SetupRouter() *chi.Mux
- type PhoneCode
- type Server
- func (self *Server) AddSetup(f func(ctx context.Context) error)
- func (self *Server) AddTeardown(f func() error)
- func (self *Server) GetCache() *models.TenureCache
- func (self *Server) GetDb() models.DbConn
- func (self *Server) GetPublicURL() string
- func (self *Server) GetSecret() []byte
- func (self *Server) GetSubConfig(key string) map[string]any
- func (self *Server) HasSubConfig(key string) bool
- func (self *Server) LoadConfig(configPaths *[]string)
- func (self *Server) Serve()
- func (self *Server) UseCORS()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStripeService ¶
func RegisterAuthService ¶
func ServeStaticFiles ¶
func SetupRouter ¶
func SetupRouter() *chi.Mux
Types ¶
type PhoneCode ¶ added in v0.0.26
type PhoneCode struct { models.SMSMessage Code string `json:"code,omitempty"` }
type Server ¶
type Server struct { Router *chi.Mux Name string `json:"name"` Seed string `json:"seed"` Port int `json:"port"` Public string `json:"public"` Secret string `json:"secret"` CorsOrigins string `json:"cors_origins"` // contains filtered or unexported fields }
func (*Server) AddTeardown ¶
func (*Server) GetCache ¶
func (self *Server) GetCache() *models.TenureCache
func (*Server) GetPublicURL ¶ added in v0.0.8
func (*Server) HasSubConfig ¶
func (*Server) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.