Documentation ¶
Index ¶
Constants ¶
View Source
const EventStringFormat string = `Timestamp %s
Proto: %s
Host: %s
Port: %s
Uri: %s
Client IP: %s
Username: %s
Returned code: %d
Result: %d
Message: %s
`
Variables ¶
View Source
var CounterNames map[CounterID]string = map[CounterID]string{ LDAP_CONN_ERROR: "ldap_connection_error", RESTARTS: "restarts", HTTP_ABRUPT_TERM: "http_abrupt_termination", API_ABRUPT_TERM: "api_abrupt_termination", SIGTERM_SIGINT: "sigterm_sigint_received", SIGHUP: "sighup_received", UNKNOWN_SIG: "unknown_signal_received", }
View Source
var ResultTypes []Result = []Result{SUCCESS_AUTH, SUCCESS_AUTH_CACHE, FAIL_AUTH, INVALID_REQUEST, OP_ERROR, NO_AUTH, SUCCESS_AUTH_NAL_COOKIE}
Functions ¶
This section is empty.
Types ¶
type PackOfEvents ¶
type PackOfEvents []*RequestEvent
func (PackOfEvents) Len ¶
func (p PackOfEvents) Len() int
func (PackOfEvents) Less ¶
func (p PackOfEvents) Less(i, j int) bool
func (PackOfEvents) Swap ¶
func (p PackOfEvents) Swap(i, j int)
type RequestEvent ¶
type RequestEvent struct { Identity Password string `json:"-"` Host string `json:"host"` Uri string `json:"uri"` Port string `json:"port"` Proto string `json:"proto"` ClientIP string `json:"client_ip"` RetCode int `json:"retcode"` Timestamp time.Time `json:"timestamp"` Message string `json:"message"` Result Result `json:"result"` Service string `json:"service"` }
func NewEmptyEvent ¶
func NewEmptyEvent() *RequestEvent
func (*RequestEvent) GenerateBackendJwt ¶
func (e *RequestEvent) GenerateBackendJwt(key *rsa.PrivateKey, issuer string) (string, error)
func (*RequestEvent) GenerateCookie ¶
func (*RequestEvent) Hmac ¶
func (e *RequestEvent) Hmac(secret []byte) []byte
func (*RequestEvent) String ¶
func (e *RequestEvent) String() string
Click to show internal directories.
Click to hide internal directories.