Versions in this module Expand all Collapse all v1 v1.3.1 Jun 13, 2019 v1.3.0 Jun 3, 2019 Changes in this version + type ClientRole struct + ID int + Name string + type Config struct + PersistencyManager PersistencyManager + WhitelistOption WhitelistOption + func (conf *Config) SetDefaults() + type Entry struct + Name string + Parameters map[string]Parameter + Query string + WhitelistedFor []int + type Error struct + Code ErrorCode + Message string + func (err Error) Error() string + type ErrorCode string + const ErrUnauthorized + const ErrWrongInput + func ErrCode(err error) ErrorCode + type GraphQLShield interface + Check func(clientRole int, query []byte, arguments map[string]*string) ([]byte, error) + ListQueries func() (map[string]Query, error) + RemoveQuery func(query Query) error + WhitelistQueries func(newEntry ...Entry) ([]Query, error) + func NewGraphQLShield(config Config, clientRoles ...ClientRole) (GraphQLShield, error) + type ID string + func (id ID) Validate() error + type Parameter struct + MaxValueLength uint32 + type PersistencyManager interface + Load func() (*State, error) + Save func(*State) error + func NewPepersistencyManagerFileJSON(path string, syncWrite bool) (PersistencyManager, error) + type Query interface + Creation func() time.Time + ID func() ID + Name func() string + Parameters func() map[string]Parameter + Query func() []byte + WhitelistedFor func() []int + type QueryModel struct + Creation time.Time + Name string + Parameters map[string]Parameter + Query string + WhitelistedFor []int + type State struct + Roles []ClientRole + WhitelistedQueries map[string]QueryModel + type WhitelistOption byte + const WhitelistDisabled + const WhitelistEnabled