Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Routes collection name
RoutesCollectionName = "routes"
)
View Source
const (
// internal services database name
ServicesDatabaseName = "services"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
Url string `bson:"url,omitempty"`
Method MethodType `bson:"method,omitempty"`
}
type MethodType ¶
type MethodType int32
const ( GET MethodType = iota HEAD POST PUT PATCH DELETE CONNECT OPTIONS TRACE )
type Route ¶
type Route struct {
Key *Key `bson:"key,omitempty"`
Endpoint string `bson:"endpoint,omitempty"`
// If the route is publically accessible, then rest of the fields
// below are not relevant
IsPublic *bool `bson:"isPublic,omitempty"`
// Route is supposed to be accessible only for root tenancy
IsRoot *bool `bson:"isRoot,omitempty"`
// if route is user specific RBAC constructs are not valid, rest of
// the fields below are not relevant
IsUserSpecific *bool `bson:"isUserSpecific,omitempty"`
// RBAC constructs associated with Route
Group string `bson:"group,omitempty"`
Resource string `bson:"resource,omitempty"`
Verb string `bson:"verb,omitempty"`
// if this is a scoped route, this array would be non empty
// well at the moment, only a single scope will be enabled
// that too will be only organisation unit.
// if first scope is not ou, then it is assumed to be
// equivalent to be empty and hence not scoped
Scopes []string `bson:"scopes,omitempty"`
}
type RouteTable ¶
func GetRouteTable ¶
func GetRouteTable() (*RouteTable, error)
func LocateRouteTable ¶
func LocateRouteTable(client db.StoreClient) (*RouteTable, error)
Click to show internal directories.
Click to hide internal directories.