Documentation
¶
Overview ¶
Package auditlogsapi provides implementations of tokens API defined in /proto/auditlogs/
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FakeAuditLog = &apb.AuditLog{}
FakeAuditLog is a fake token. TODO: move these fakes to test file once implemented.
Functions ¶
func ToAccessLog ¶
ToAccessLog converts an entry for access log to an audit log. Assumes that e is not nil.
func ToAuditLog ¶
ToAuditLog converts a Stackdriver log entry into an AuditLog.
Types ¶
type AuditLogs ¶
type AuditLogs struct {
// contains filtered or unexported fields
}
AuditLogs is implments the audit logs API for DAM. Currently support GCP tokens.
func NewAuditLogs ¶
func NewAuditLogs(sdl lgrpcpb.LoggingServiceV2Client, projectID string) *AuditLogs
NewAuditLogs creates a new AuditLogs.
func (*AuditLogs) ListAuditLogs ¶
func (s *AuditLogs) ListAuditLogs(ctx context.Context, req *apb.ListAuditLogsRequest) (*apb.ListAuditLogsResponse, error)
ListAuditLogs lists the audit logs.
type AuditLogsHandler ¶
type AuditLogsHandler struct {
// contains filtered or unexported fields
}
AuditLogsHandler is a HTTP handler wrapping a GRPC server.
func NewAuditLogsHandler ¶
func NewAuditLogsHandler(s agpb.AuditLogsServer) *AuditLogsHandler
NewAuditLogsHandler returns a new AuditLogsHandler.
func (*AuditLogsHandler) ListAuditLogs ¶
func (h *AuditLogsHandler) ListAuditLogs(w http.ResponseWriter, r *http.Request)
ListAuditLogs handles ListAuditLogs HTTP requests.
type Stub ¶
Stub is a stub implementation.
func (*Stub) ListAuditLogs ¶
func (s *Stub) ListAuditLogs(_ context.Context, req *apb.ListAuditLogsRequest) (*apb.ListAuditLogsResponse, error)
ListAuditLogs lists the AuditLogs.