Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AuditEventType = graphql.NewObject(graphql.ObjectConfig{ Name: "AuditEvent", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { auditEvent, _ := p.Source.(models.AuditEvent) return auditEvent.Id.Hex(), nil }, }, "user": &graphql.Field{ Type: adminTypes.UserType, Resolve: func(p graphql.ResolveParams) (interface{}, error) { auditEvent, _ := p.Source.(models.AuditEvent) user, err := adminServices.GetUserById(auditEvent.User) if err != nil { return nil, nil } return *user, nil }, }, "ipLocal": &graphql.Field{ Type: graphql.String, }, "ipRemote": &graphql.Field{ Type: graphql.String, }, "agent": &graphql.Field{ Type: graphql.String, }, "auth": &graphql.Field{ Type: graphql.String, }, "token": &graphql.Field{ Type: graphql.String, }, "consult": &graphql.Field{ Type: graphql.String, }, "operations": &graphql.Field{ Type: graphql.NewList(OperationAuditType), }, }, })
View Source
var OperationAuditType = graphql.NewObject(graphql.ObjectConfig{ Name: "OperationAudit", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { operationAudit, _ := p.Source.(models.OperationAudit) return operationAudit.Id.Hex(), nil }, }, "operation": &graphql.Field{ Type: adminTypes.OperationType, Resolve: func(p graphql.ResolveParams) (interface{}, error) { operationAudit, _ := p.Source.(models.OperationAudit) return adminServices.GetOperationByID(operationAudit.Operation) }, }, "permission": &graphql.Field{ Type: graphql.Boolean, }, "nowStruct": &graphql.Field{ Type: graphql.String, }, "newStruct": &graphql.Field{ Type: graphql.String, }, "error": &graphql.Field{ Type: graphql.String, }, "result": &graphql.Field{ Type: graphql.Boolean, }, "timeB": &graphql.Field{ Type: graphql.String, }, "timeE": &graphql.Field{ Type: graphql.String, }, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.