model

package
v0.0.0-...-084323b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricLogCreateMetadata = "log_create_metadata"
	MetricLogEncryptMessage = "log_encrypt_message"
	MetricLogGetMetadata    = "log_get_metadata"
	MetricLogInsertMessage  = "log_insert_message"
	MetricLogServiceStartup = "log_service_startup"
	MetricLogStreamMessage  = "log_stream_message"

	MetricLabelModule  = "module"
	MetricLabelOutcome = "outcome"

	MetricValueFailed  = "failed"
	MetricValueSuccess = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyManager

type KeyManager interface {
	Create(ctx context.Context) (string, error)
	Decrypt(ctx context.Context, key string, data []byte) ([]byte, error)
	Encrypt(ctx context.Context, key string, data []byte) ([]byte, error)
}

type Log

type Log struct {
	Context string
	Name    string
}

type LogMetadata

type LogMetadata struct {
	Key   string
	Log   *Log
	LogID string
}

type LogMetadataManager

type LogMetadataManager interface {
	Create(ctx context.Context, log *Log) (*LogMetadata, error)
	Get(ctx context.Context, id string) (*LogMetadata, error)
}

Jump to

Keyboard shortcuts

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