Documentation ¶
Index ¶
Constants ¶
View Source
const ( NamespacePattern = "/ns/{namespace:[a-zA-Z0-9]+}" KeyValuePattern = "/ns/{namespace:[a-zA-Z0-9]+}/{key:[a-zA-Z0-9]+}" SearchPattern = "/search/{namespace:[a-zA-Z0-9]+}" SchemaPattern = "/schema/{namespace:[a-zA-Z0-9]+}" OpenAPIPattern = "/{openapi|swagger}.json" BrokerPattern = "/broker" SwaggerUIPattern = "/swaggerui/" SchemaId = "_schema" EVENT_ITEM_ADDED = "ITEM_ADDED" EVENT_ITEM_DELETED = "ITEM_DELETED" EVENT_NAMESPACE_DELETED = "NAMESPACE_DELETED" )
View Source
const (
USER_HEADER = "USER_HEADER"
)
Variables ¶
View Source
var (
ErrInvalidArguments = errors.New("invalid arguments")
)
Functions ¶
This section is empty.
Types ¶
type Broker ¶ added in v1.1.0
type Broker struct { // Events are pushed to this channel by the main events-gathering routine Notifier chan []byte // contains filtered or unexported fields }
type BrokerEvent ¶ added in v1.1.0
type Database ¶
type Database interface { Init() Upsert(namespace string, key string, value []byte) *database.DbError Get(namespace string, key string) ([]byte, *database.DbError) GetAll(namespace string) (map[string][]byte, *database.DbError) Delete(namespace string, key string) *database.DbError DeleteAll(namespace string) *database.DbError GetNamespaces() []string }
type JWTAuthMiddleware ¶ added in v1.2.0
type JWTAuthMiddleware struct {
VerifyBytes []byte
}
func (*JWTAuthMiddleware) GetMiddleWare ¶ added in v1.2.0
type Payload ¶ added in v1.2.0
type Payload struct { User string `json:"user_id"` Data interface{} `json:"data"` }
type TestingRouter ¶
func (*TestingRouter) AddHandler ¶
func (tr *TestingRouter) AddHandler(path string, handler func(http.ResponseWriter, *http.Request), queryParamsPairs ...string)
func (*TestingRouter) ExecuteRequest ¶
func (tr *TestingRouter) ExecuteRequest(req *http.Request) *httptest.ResponseRecorder
Click to show internal directories.
Click to hide internal directories.