Documentation ¶
Index ¶
- Constants
- Variables
- func Default404Handler(app App) libhttp.Service
- func DefaultLongPath(module Module, route Route) string
- func GetCurrentDir() (dirAbsPath string, err error)
- func GetGoEnv() (map[string]string, error)
- func GetPackagePath(i interface{}) string
- type App
- type Config
- type DefaultEntity
- type Entity
- type GenericResponse
- type Module
- type Pipeline
- type Repository
- type Route
- type Service
- type Validator
- type ValidatorWithService
Constants ¶
View Source
const ( StructTagName = "name" StructTagSQL = "sql" )
Variables ¶
View Source
var (
FieldNotFound = errors.New("field was not found")
)
Functions ¶
func Default404Handler ¶
func DefaultLongPath ¶
func GetCurrentDir ¶
func GetPackagePath ¶
func GetPackagePath(i interface{}) string
Types ¶
type App ¶
type App struct { Addr string `json:"addr"` Config Config `json:"config"` Modules map[string]Module `json:"modules"` Router *libhttp.Router Debug bool Verbose bool }
func (App) PrintConfig ¶
func (app App) PrintConfig()
func (App) PrintRoutes ¶
type Config ¶
type Config struct { EnableAuthOnOptions bool `json:"enable_auth_on_options"` TokenExtractors []string `json:"token_extractors" validate:"> one_of=headers,params"` // allowed values are "headers" and "params" OAuthJsonWebKeySetsUrl string `json:"oauth_json_web_key_sets_url"` OAuthIssuer string `json:"oauth_issuer"` OAuthAudience string `json:"oauth_audience"` }
func ParseConfig ¶
type DefaultEntity ¶
func (*DefaultEntity) Index ¶
func (e *DefaultEntity) Index() uuid.UUID
func (*DefaultEntity) SetIndex ¶
func (e *DefaultEntity) SetIndex(u uuid.UUID)
type GenericResponse ¶
type GenericResponse struct { Message interface{} `json:"message"` Error *string `json:"error,omitempty"` }
type Pipeline ¶
type Pipeline interface { Consume(objs ...interface{}) (interface{}, error) Init(objs ...interface{}) (interface{}, error) }
func LoadPipeline ¶
type Repository ¶
type Validator ¶
func GenerateJSONValidator ¶
func GenerateJSONValidator(i interface{}) *Validator
type ValidatorWithService ¶
Click to show internal directories.
Click to hide internal directories.