Documentation
¶
Index ¶
- Constants
- Variables
- func AuditRequestGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func AuditRequestHttp(next http.Handler) http.Handler
- func AuditWebSockets(ctx context.Context, req *schema.Request)
- func Close()
- func GetAuditConf(conf string) *x.LoggerConf
- func InitAuditor(conf *x.LoggerConf, gId, nId uint64) error
- func InitAuditorIfNecessary(conf *x.LoggerConf) error
- type AuditEvent
- type ResponseWriter
Constants ¶
View Source
const ( NodeTypeAlpha = "alpha" NodeTypeZero = "zero" )
View Source
const ( UnknownUser = "UnknownUser" UnknownNamespace = math.MaxUint64 PoorManAuth = "PoorManAuth" Grpc = "Grpc" Http = "Http" WebSocket = "Websocket" )
Variables ¶
View Source
var CmdAudit x.SubCommand
Functions ¶
func AuditRequestGRPC ¶
func AuditRequestGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func Close ¶
func Close()
Close stops the ticker and sync the pending logs in buffer. It also sets the log to nil, because its being called by zero when license expires. If license added, InitLogger will take care of the file.
func GetAuditConf ¶
func GetAuditConf(conf string) *x.LoggerConf
func InitAuditor ¶
func InitAuditor(conf *x.LoggerConf, gId, nId uint64) error
InitAuditor initializes the auditor.
func InitAuditorIfNecessary ¶
func InitAuditorIfNecessary(conf *x.LoggerConf) error
InitAuditorIfNecessary accepts conf and initialized auditor.
Types ¶
type AuditEvent ¶
type ResponseWriter ¶
type ResponseWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *ResponseWriter
func (*ResponseWriter) WriteHeader ¶
func (rw *ResponseWriter) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.