history

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID               QueryID
	Type             EntryType
	URL              string
	Referer          string
	Timestamp        time.Time
	AppName          string
	StartTime        time.Time
	EndTime          time.Time
	Profiles         []string
	UserID           string
	UserEmail        string
	OrganizationName string
}

func (*Entry) PopulateFromRequest

func (in *Entry) PopulateFromRequest(req *http.Request)

type EntryType

type EntryType string
const (
	EntryTypeRender  EntryType = "render"
	EntryTypeMerge   EntryType = "merge"
	EntryTypeCompare EntryType = "compare"
	EntryTypeDiff    EntryType = "diff"
)

type Manager

type Manager interface {
	Add(ctx context.Context, entry *Entry) (QueryID, error)
	Get(ctx context.Context, id QueryID) (*Entry, error)
	List(ctx context.Context, cursor string) ([]*Entry, string, error)
}

type MemStoreManager

type MemStoreManager struct {
	// contains filtered or unexported fields
}

func NewMemStoreManager

func NewMemStoreManager() *MemStoreManager

func (*MemStoreManager) Add

func (m *MemStoreManager) Add(_ context.Context, e *Entry) (QueryID, error)

func (*MemStoreManager) Get

func (m *MemStoreManager) Get(_ context.Context, qid QueryID) (*Entry, error)

func (*MemStoreManager) List

func (*MemStoreManager) List(_ context.Context, _ string) ([]*Entry, string, error)

type NoopManager

type NoopManager struct{}

func (*NoopManager) Add

func (*NoopManager) Add(_ context.Context, _ *Entry) (QueryID, error)

func (*NoopManager) Get

func (*NoopManager) Get(_ context.Context, _ QueryID) (*Entry, error)

func (*NoopManager) List

func (*NoopManager) List(_ context.Context, _ string) ([]*Entry, string, error)

type QueryID

type QueryID string

func GenerateQueryID

func GenerateQueryID() QueryID

Jump to

Keyboard shortcuts

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