Documentation ¶
Index ¶
- Constants
- func GetSchema(s *schema.Schema, authorization schema.Authorization) (result *schema.Resource, err error)
- func MapNamespacesRoutes(route martini.Router)
- func MapRouteBySchema(server *Server, dataStore db.DB, s *schema.Schema)
- func MapRouteBySchemas(server *Server, dataStore db.DB)
- func MonitoringUpdate(response *gohan_sync.Event, server *Server) error
- func RunServer(configFile string)
- func StateUpdate(response *gohan_sync.Event, server *Server) error
- type DbSyncWrapper
- type Server
Constants ¶
View Source
const ( //StateUpdateEventName used in etcd path StateUpdateEventName = "state_update" //MonitoringUpdateEventName used in etcd path MonitoringUpdateEventName = "monitoring_update" )
Variables ¶
This section is empty.
Functions ¶
func GetSchema ¶
func GetSchema(s *schema.Schema, authorization schema.Authorization) (result *schema.Resource, err error)
GetSchema returns the schema filtered and trimmed for a specific user or nil when the user shouldn't see it at all
func MapNamespacesRoutes ¶
MapNamespacesRoutes maps routes for all namespaces
func MapRouteBySchema ¶
MapRouteBySchema setup api route by schema
func MapRouteBySchemas ¶
MapRouteBySchemas setup route for all loaded schema
func MonitoringUpdate ¶
func MonitoringUpdate(response *gohan_sync.Event, server *Server) error
MonitoringUpdate updates the state in the db based on the sync event
func StateUpdate ¶
func StateUpdate(response *gohan_sync.Event, server *Server) error
StateUpdate updates the state in the db based on the sync event
Types ¶
type DbSyncWrapper ¶
DbSyncWrapper wraps db.DB so it logs events in database on every transaction.
func (*DbSyncWrapper) Begin ¶
func (sw *DbSyncWrapper) Begin() (transaction.Transaction, error)
Begin wraps transaction object with sync
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a struct for GohanAPIServer
func (*Server) NewEnvironmentForPath ¶
func (server *Server) NewEnvironmentForPath(name string, path string) (env extension.Environment, err error)
NewEnvironmentForPath creates an extension environment and loads extensions for path
Source Files ¶
Click to show internal directories.
Click to hide internal directories.