Documentation ¶
Index ¶
- Constants
- Variables
- func GetTag(w http.ResponseWriter, r *http.Request) (kv event.KeyVal)
- type AuthUser
- type ConfigHash
- type ConfigVersion
- type Delete
- type Deleter
- type EndPointer
- type EscalationConfig
- type EventStats
- type Get
- type GetUserResponse
- type Getter
- type HashResponse
- type Incident
- type NeedsAuther
- type NewUserRequest
- type PolicyConfig
- type Post
- type Poster
- type ProviderConfig
- type Put
- type Putter
- type Request
- type RequestHandler
- type Server
- type Session
- type SessionToken
- type SystemStats
- type Tag
- type User
- type UserPassword
- type UserPermissions
Constants ¶
const ( SESSION_HEADER_NAME = "BANG_SESSION" EXPIRED_SESSION_TOKEN = 4000 INVALID_SESSION_TOKEN = 4001 )
Variables ¶
var ( GlobalSession *Session InvalidSessionToken = errors.New("Invalid Session Token") ExpiredSessionToken = errors.New("Session Token Expired") )
var (
MUST_INCLUDE_ID = errors.New("Must include id")
)
Functions ¶
Types ¶
type AuthUser ¶ added in v0.15.0
type AuthUser struct {
// contains filtered or unexported fields
}
AuthUser handles the api methods for incidents
func NewAuthUser ¶ added in v0.15.0
NewAuthUser Create a new AuthUser api method
type ConfigHash ¶
type ConfigHash struct {
// contains filtered or unexported fields
}
ConfigHash handles the api methods for incidents
func NewConfigHash ¶
func NewConfigHash(pipe *pipeline.Pipeline) *ConfigHash
NewConfigHash Create a new ConfigHash api method
func (*ConfigHash) EndPoint ¶
func (c *ConfigHash) EndPoint() string
EndPoint return the endpoint of this method
func (*ConfigHash) Get ¶
func (c *ConfigHash) Get(w http.ResponseWriter, r *http.Request)
Get HTTP get method
type ConfigVersion ¶ added in v0.15.0
type ConfigVersion struct {
// contains filtered or unexported fields
}
ConfigVersion handles the api methods for incidents
func NewConfigVersion ¶ added in v0.15.0
func NewConfigVersion(pipe *pipeline.Pipeline) *ConfigVersion
NewConfigVersion Create a new ConfigVersion api method
func (*ConfigVersion) EndPoint ¶ added in v0.15.0
func (c *ConfigVersion) EndPoint() string
EndPoint return the endpoint of this method
func (*ConfigVersion) Get ¶ added in v0.15.0
func (c *ConfigVersion) Get(req *Request)
Get HTTP get method
func (*ConfigVersion) Post ¶ added in v0.15.0
func (c *ConfigVersion) Post(req *Request)
change the current config to a spesific version
type Delete ¶ added in v0.15.0
type Delete RequestHandler
func (Delete) NeedsAuth ¶ added in v0.15.0
func (d Delete) NeedsAuth() config.UserPermissions
type Deleter ¶
type Deleter interface {
Delete(*Request)
}
A Deleter provides an http "DELETE" method
type EndPointer ¶
type EndPointer interface {
EndPoint() string
}
An EndPointer returns the end point for this method
type EscalationConfig ¶ added in v0.15.0
type EscalationConfig struct {
// contains filtered or unexported fields
}
EscalationConfig handles the api methods for incidents
func NewEscalationConfig ¶ added in v0.15.0
func NewEscalationConfig(pipe *pipeline.Pipeline) *EscalationConfig
func (*EscalationConfig) Delete ¶ added in v0.15.0
func (p *EscalationConfig) Delete(req *Request)
Delete the given event provider
func (*EscalationConfig) EndPoint ¶ added in v0.15.0
func (p *EscalationConfig) EndPoint() string
EndPoint return the endpoint of this method
func (*EscalationConfig) Get ¶ added in v0.15.0
func (p *EscalationConfig) Get(req *Request)
Get HTTP get method
func (*EscalationConfig) Post ¶ added in v0.15.0
func (p *EscalationConfig) Post(req *Request)
Post HTTP get method
type EventStats ¶
type EventStats struct {
// contains filtered or unexported fields
}
handles the api methods for incidents
func NewEventStats ¶
func NewEventStats(pipe *pipeline.Pipeline) *EventStats
func (*EventStats) EndPoint ¶
func (e *EventStats) EndPoint() string
func (*EventStats) Get ¶
func (e *EventStats) Get(req *Request)
type Get ¶ added in v0.15.0
type Get RequestHandler
func (Get) NeedsAuth ¶ added in v0.15.0
func (g Get) NeedsAuth() config.UserPermissions
type GetUserResponse ¶ added in v0.15.0
type HashResponse ¶
HashResponse will be marshaled as json as the successful response
type Incident ¶
type Incident struct {
// contains filtered or unexported fields
}
handles the api methods for incidents
func NewIncident ¶
type NeedsAuther ¶ added in v0.15.0
type NeedsAuther interface {
NeedsAuth() config.UserPermissions
}
type NewUserRequest ¶ added in v0.15.0
type PolicyConfig ¶ added in v0.15.0
type PolicyConfig struct {
// contains filtered or unexported fields
}
PolicyConfig handles the api methods for incidents
func NewPolicyConfig ¶ added in v0.15.0
func NewPolicyConfig(pipe *pipeline.Pipeline) *PolicyConfig
func (*PolicyConfig) Delete ¶ added in v0.15.0
func (p *PolicyConfig) Delete(req *Request)
Delete the given event provider
func (*PolicyConfig) EndPoint ¶ added in v0.15.0
func (p *PolicyConfig) EndPoint() string
EndPoint return the endpoint of this method
func (*PolicyConfig) Get ¶ added in v0.15.0
func (p *PolicyConfig) Get(req *Request)
Get HTTP get method
func (*PolicyConfig) Post ¶ added in v0.15.0
func (p *PolicyConfig) Post(req *Request)
Post HTTP get method
type Post ¶ added in v0.15.0
type Post RequestHandler
func (Post) NeedsAuth ¶ added in v0.15.0
func (p Post) NeedsAuth() config.UserPermissions
type ProviderConfig ¶ added in v0.15.0
type ProviderConfig struct {
// contains filtered or unexported fields
}
ProviderConfig handles the api methods for incidents
func NewProviderConfig ¶ added in v0.15.0
func NewProviderConfig(pipe *pipeline.Pipeline) *ProviderConfig
func (*ProviderConfig) Delete ¶ added in v0.15.0
func (p *ProviderConfig) Delete(req *Request)
Delete the given event provider
func (*ProviderConfig) EndPoint ¶ added in v0.15.0
func (c *ProviderConfig) EndPoint() string
EndPoint return the endpoint of this method
func (*ProviderConfig) Get ¶ added in v0.15.0
func (c *ProviderConfig) Get(req *Request)
Get HTTP get method
func (*ProviderConfig) Post ¶ added in v0.15.0
func (c *ProviderConfig) Post(req *Request)
Post HTTP get method
type Put ¶ added in v0.15.0
type Put RequestHandler
func (Put) NeedsAuth ¶ added in v0.15.0
func (p Put) NeedsAuth() config.UserPermissions
type Putter ¶ added in v0.15.0
type Putter interface {
Put(*Request)
}
A Putter provides an http "POST" method
type RequestHandler ¶ added in v0.15.0
type RequestHandler func(*Request)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server Serves the http api for bangarang
type Session ¶ added in v0.15.0
func NewSession ¶ added in v0.15.0
func NewSession() *Session
type SessionToken ¶ added in v0.15.0
type SessionToken struct {
// contains filtered or unexported fields
}
func NewSessionToken ¶ added in v0.15.0
func NewSessionToken(userName string) SessionToken
NewSessionToken create a unique session token for the given user id
type SystemStats ¶ added in v0.15.0
type SystemStats struct {
// contains filtered or unexported fields
}
handles the api methods for incidents
func NewSystemStats ¶ added in v0.15.0
func NewSystemStats(pipe *pipeline.Pipeline) *SystemStats
func (*SystemStats) EndPoint ¶ added in v0.15.0
func (e *SystemStats) EndPoint() string
func (*SystemStats) Get ¶ added in v0.15.0
func (e *SystemStats) Get(req *Request)
type Tag ¶ added in v0.15.0
type Tag struct {
// contains filtered or unexported fields
}
handles the api methods for incidents
type User ¶ added in v0.15.0
type User struct {
// contains filtered or unexported fields
}
User handles the api methods for incidents
type UserPassword ¶ added in v0.15.0
type UserPassword struct {
// contains filtered or unexported fields
}
UserPassword handles the api methods for incidents
func NewUserPassword ¶ added in v0.15.0
func NewUserPassword(pipe *pipeline.Pipeline) *UserPassword
NewUserPassword Create a new UserPassword api method
func (*UserPassword) EndPoint ¶ added in v0.15.0
func (u *UserPassword) EndPoint() string
EndPoint return the endpoint of this method
func (*UserPassword) Post ¶ added in v0.15.0
func (up *UserPassword) Post(req *Request)
Post changes the permissions for this user
type UserPermissions ¶ added in v0.15.0
type UserPermissions struct {
// contains filtered or unexported fields
}
UserPermissions handles the api methods for incidents
func NewUserPermissions ¶ added in v0.15.0
func NewUserPermissions(pipe *pipeline.Pipeline) *UserPermissions
NewUserPermissions Create a new UserPermissions api method
func (*UserPermissions) EndPoint ¶ added in v0.15.0
func (u *UserPermissions) EndPoint() string
EndPoint return the endpoint of this method
func (*UserPermissions) Post ¶ added in v0.15.0
func (up *UserPermissions) Post(req *Request)
Post changes the permissions for this user