model

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertGroup

type AlertGroup struct {
	// Identifier in form of uuid string. It corresponds to the Name
	// field in proto request definition. The model Name property is
	// unrelated.
	ID string `gae:"$id"`

	// We use this field to catch any properties that we don't explicitly list
	// below from Anomaly entities.If you need to use one of these fields -
	// add it to the schema.
	UndeclaredFields datastore.PropertyMap `gae:",extra"`

	// Name by default corresponds to test benchmark name or to a custom
	// name set through ALERT_GROUPING sparce diagnostic.
	Name             string        `gae:"name"`
	Domain           string        `gae:"domain"`
	SubscriptionName string        `gae:"subscription_name"`
	Status           int64         `gae:"status,noindex"`
	GroupType        int64         `gae:"group_type,noindex"`
	Active           bool          `gae:"active"`
	Created          time.Time     `gae:"created,noindex"`
	Updated          time.Time     `gae:"updated,noindex"`
	Revision         RevisionRange `gae:"revision"`
	ProjectId        string        `gae:"project_id"`
	// TODO(crbug.com/1218071): we should prefer int or string over Key here
	// (as well as for similar properties in other models).
	Anomalies []*datastore.Key `gae:"anomalies,noindex"`
}

Definition of an AlertGroup model. This is a golang copy of a corresponding type from python codebase: https://source.chromium.org/chromium/chromium/src/+/master:third_party/catapult/dashboard/dashboard/models/alert_group.py

type AlertGroupDAO

type AlertGroupDAO interface {
	Get(ctx context.Context, id string) (*AlertGroup, error)
	Update(ctx context.Context, entity *AlertGroup) error
	Delete(ctx context.Context, entity *AlertGroup) error
}

type Anomaly

type Anomaly struct {
	ID int64 `gae:"$id"`

	// We use this field to catch any properties that we don't explicitly list
	// below from Anomaly entities.If you need to use one of these fields -
	// add it to the schema.
	UndeclaredFields datastore.PropertyMap `gae:",extra"`

	Groups []*datastore.Key `gae:"groups"`
}

Definition of an Anomaly model. This is a golang copy of a corresponding type from python codebase: https://source.chromium.org/chromium/chromium/src/+/master:third_party/catapult/dashboard/dashboard/models/anomaly.py

type AnomalyDAO

type AnomalyDAO interface {
	Get(ctx context.Context, id int64) (*Anomaly, error)
	Update(ctx context.Context, entity *Anomaly) error
}

type RevisionRange

type RevisionRange struct {
	Repository string `gae:"repository"`
	Start      int64  `gae:"start"`
	End        int64  `gae:"end"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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