auditlogsapi

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package auditlogsapi provides implementations of tokens API defined in /proto/auditlogs/

Index

Constants

This section is empty.

Variables

View Source
var FakeAuditLog = &apb.AuditLog{}

FakeAuditLog is a fake token. TODO: move these fakes to test file once implemented.

Functions

func ToAccessLog

func ToAccessLog(e *lepb.LogEntry) (*apb.AuditLog, error)

ToAccessLog converts an entry for access log to an audit log. Assumes that e is not nil.

func ToAuditLog

func ToAuditLog(e *lepb.LogEntry) (*apb.AuditLog, error)

ToAuditLog converts a Stackdriver log entry into an AuditLog.

func ToPolicyLog

func ToPolicyLog(e *lepb.LogEntry) (*apb.AuditLog, error)

ToPolicyLog converts an entry for access log to an audit log. Assumes that e is not nil.

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

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

type Stub struct {
	AuditLog *apb.AuditLog
}

Stub is a stub implementation.

func (*Stub) ListAuditLogs

ListAuditLogs lists the AuditLogs.

Directories

Path Synopsis
Binary itest is an integration test for the API with the Stackdriver.
Binary itest is an integration test for the API with the Stackdriver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL