audit

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SessionConnected     event = "session_connected"
	SessionDisonnected   event = "session_disconnected"
	SubscriptionCreated  event = "subscription_created"
	SubscriptionDeleted  event = "subscription_deleted"
	RetainMessageStored  event = "retained_message_stored"
	RetainMessageDeleted event = "retained_message_deleted"
	PeerLost             event = "peer_lost"
)

Variables

View Source
var FuncMap = template.FuncMap{
	"humanBytes": func(n int64) string {
		return humanize.Bytes(uint64(n))
	},
	"bytesToString": func(b []byte) string { return string(b) },
	"shorten":       func(s string) string { return s[0:8] },
	"parseDate": func(i int64) string {
		return time.Unix(0, i).Format(time.RFC3339)
	},
	"timeToDuration": func(i int64) string {
		return humanize.Time(time.Unix(i, 0))
	},
}

Functions

func RegisterWaspAuditRecorderServer added in v1.4.0

func RegisterWaspAuditRecorderServer(s *grpc.Server, srv WaspAuditRecorderServer)

Types

type PutWaspEventRequest added in v1.4.0

type PutWaspEventRequest struct {
	Events               []*WaspEvent `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*PutWaspEventRequest) Descriptor added in v1.4.0

func (*PutWaspEventRequest) Descriptor() ([]byte, []int)

func (*PutWaspEventRequest) GetEvents added in v1.4.0

func (m *PutWaspEventRequest) GetEvents() []*WaspEvent

func (*PutWaspEventRequest) ProtoMessage added in v1.4.0

func (*PutWaspEventRequest) ProtoMessage()

func (*PutWaspEventRequest) Reset added in v1.4.0

func (m *PutWaspEventRequest) Reset()

func (*PutWaspEventRequest) String added in v1.4.0

func (m *PutWaspEventRequest) String() string

func (*PutWaspEventRequest) XXX_DiscardUnknown added in v1.4.0

func (m *PutWaspEventRequest) XXX_DiscardUnknown()

func (*PutWaspEventRequest) XXX_Marshal added in v1.4.0

func (m *PutWaspEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutWaspEventRequest) XXX_Merge added in v1.4.0

func (m *PutWaspEventRequest) XXX_Merge(src proto.Message)

func (*PutWaspEventRequest) XXX_Size added in v1.4.0

func (m *PutWaspEventRequest) XXX_Size() int

func (*PutWaspEventRequest) XXX_Unmarshal added in v1.4.0

func (m *PutWaspEventRequest) XXX_Unmarshal(b []byte) error

type PutWaspWaspEventsResponse added in v1.4.0

type PutWaspWaspEventsResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutWaspWaspEventsResponse) Descriptor added in v1.4.0

func (*PutWaspWaspEventsResponse) Descriptor() ([]byte, []int)

func (*PutWaspWaspEventsResponse) ProtoMessage added in v1.4.0

func (*PutWaspWaspEventsResponse) ProtoMessage()

func (*PutWaspWaspEventsResponse) Reset added in v1.4.0

func (m *PutWaspWaspEventsResponse) Reset()

func (*PutWaspWaspEventsResponse) String added in v1.4.0

func (m *PutWaspWaspEventsResponse) String() string

func (*PutWaspWaspEventsResponse) XXX_DiscardUnknown added in v1.4.0

func (m *PutWaspWaspEventsResponse) XXX_DiscardUnknown()

func (*PutWaspWaspEventsResponse) XXX_Marshal added in v1.4.0

func (m *PutWaspWaspEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutWaspWaspEventsResponse) XXX_Merge added in v1.4.0

func (m *PutWaspWaspEventsResponse) XXX_Merge(src proto.Message)

func (*PutWaspWaspEventsResponse) XXX_Size added in v1.4.0

func (m *PutWaspWaspEventsResponse) XXX_Size() int

func (*PutWaspWaspEventsResponse) XXX_Unmarshal added in v1.4.0

func (m *PutWaspWaspEventsResponse) XXX_Unmarshal(b []byte) error

type Recorder

type Recorder interface {
	RecordEvent(tenant string, eventKind event, payload map[string]string) error
}

func GRPCRecorder added in v1.4.0

func GRPCRecorder(remote *grpc.ClientConn) Recorder

func NoneRecorder

func NoneRecorder() Recorder

func StdoutRecorder

func StdoutRecorder() Recorder

type UnimplementedWaspAuditRecorderServer added in v1.4.0

type UnimplementedWaspAuditRecorderServer struct {
}

UnimplementedWaspAuditRecorderServer can be embedded to have forward compatible implementations.

func (*UnimplementedWaspAuditRecorderServer) PutWaspEvents added in v1.4.0

type WaspAuditRecorderClient added in v1.4.0

type WaspAuditRecorderClient interface {
	PutWaspEvents(ctx context.Context, in *PutWaspEventRequest, opts ...grpc.CallOption) (*PutWaspWaspEventsResponse, error)
}

WaspAuditRecorderClient is the client API for WaspAuditRecorder service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWaspAuditRecorderClient added in v1.4.0

func NewWaspAuditRecorderClient(cc *grpc.ClientConn) WaspAuditRecorderClient

type WaspAuditRecorderServer added in v1.4.0

type WaspAuditRecorderServer interface {
	PutWaspEvents(context.Context, *PutWaspEventRequest) (*PutWaspWaspEventsResponse, error)
}

WaspAuditRecorderServer is the server API for WaspAuditRecorder service.

type WaspEvent added in v1.4.0

type WaspEvent struct {
	Timestamp            int64                 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Tenant               string                `protobuf:"bytes,2,opt,name=Tenant,proto3" json:"Tenant,omitempty"`
	Kind                 string                `protobuf:"bytes,3,opt,name=Kind,proto3" json:"Kind,omitempty"`
	Attributes           []*WaspEventAttribute `protobuf:"bytes,4,rep,name=Attributes,proto3" json:"Attributes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*WaspEvent) Descriptor added in v1.4.0

func (*WaspEvent) Descriptor() ([]byte, []int)

func (*WaspEvent) GetAttributes added in v1.4.0

func (m *WaspEvent) GetAttributes() []*WaspEventAttribute

func (*WaspEvent) GetKind added in v1.4.0

func (m *WaspEvent) GetKind() string

func (*WaspEvent) GetTenant added in v1.4.0

func (m *WaspEvent) GetTenant() string

func (*WaspEvent) GetTimestamp added in v1.4.0

func (m *WaspEvent) GetTimestamp() int64

func (*WaspEvent) ProtoMessage added in v1.4.0

func (*WaspEvent) ProtoMessage()

func (*WaspEvent) Reset added in v1.4.0

func (m *WaspEvent) Reset()

func (*WaspEvent) String added in v1.4.0

func (m *WaspEvent) String() string

func (*WaspEvent) XXX_DiscardUnknown added in v1.4.0

func (m *WaspEvent) XXX_DiscardUnknown()

func (*WaspEvent) XXX_Marshal added in v1.4.0

func (m *WaspEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WaspEvent) XXX_Merge added in v1.4.0

func (m *WaspEvent) XXX_Merge(src proto.Message)

func (*WaspEvent) XXX_Size added in v1.4.0

func (m *WaspEvent) XXX_Size() int

func (*WaspEvent) XXX_Unmarshal added in v1.4.0

func (m *WaspEvent) XXX_Unmarshal(b []byte) error

type WaspEventAttribute added in v1.4.0

type WaspEventAttribute struct {
	Key                  string   `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WaspEventAttribute) Descriptor added in v1.4.0

func (*WaspEventAttribute) Descriptor() ([]byte, []int)

func (*WaspEventAttribute) GetKey added in v1.4.0

func (m *WaspEventAttribute) GetKey() string

func (*WaspEventAttribute) GetValue added in v1.4.0

func (m *WaspEventAttribute) GetValue() string

func (*WaspEventAttribute) ProtoMessage added in v1.4.0

func (*WaspEventAttribute) ProtoMessage()

func (*WaspEventAttribute) Reset added in v1.4.0

func (m *WaspEventAttribute) Reset()

func (*WaspEventAttribute) String added in v1.4.0

func (m *WaspEventAttribute) String() string

func (*WaspEventAttribute) XXX_DiscardUnknown added in v1.4.0

func (m *WaspEventAttribute) XXX_DiscardUnknown()

func (*WaspEventAttribute) XXX_Marshal added in v1.4.0

func (m *WaspEventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WaspEventAttribute) XXX_Merge added in v1.4.0

func (m *WaspEventAttribute) XXX_Merge(src proto.Message)

func (*WaspEventAttribute) XXX_Size added in v1.4.0

func (m *WaspEventAttribute) XXX_Size() int

func (*WaspEventAttribute) XXX_Unmarshal added in v1.4.0

func (m *WaspEventAttribute) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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