Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Custom ¶
func Custom() error
Custom is responsible to load custom configurations
First it checks whether user have specified custom configs. Then checks whether them are suitable and valid. Finally tries to load them.
func ServiceProviderConfig ¶
func ServiceProviderConfig() core.ServiceProviderConfig
ServiceProviderConfig returns the current service provider config
Types ¶
type Configuration ¶
type Configuration struct { Storage Debug bool Port int `default:"8787" validate:"min=1024,max=65535"` ServiceProviderConfig string `validate:"omitempty,pathexists,isfile=.json"` Config string `validate:"omitempty,pathexists,isdir,hassubdir=schemas,hassubdir=resources"` // (todo) > check the config directory contains two directories, one for resource types and one for schemas, and that them contains json files PageSize int `default:"10" validate:"min=1,max=10"` Enable }
Configuration is ...
var ( // Values contains the configuration values Values *Configuration // Errors contains the happened configuration errors Errors validator.ValidationErrors )
type Storage ¶
type Storage struct { Type string `default:"mongo" validate:"eq=mongo"` // (note) > since we are only supporting mongo at the moment Host string `default:"0.0.0.0" validate:"hostname|ip4_addr"` Port int `default:"27017" validate:"min=1024,max=65535"` Name string `default:"scimd" validate:"min=1,excludesall=/\\.*<>:?$\""` // cannot contain any of these characters /, \, ., *, <, >, :, , ?, $, " (fixme) exclude also => | Coll string `default:"resources" validate:"min=1,excludes=$,nstartswith=system."` }
Storage is ...
Click to show internal directories.
Click to hide internal directories.