messages

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package messages is a generated protocol buffer package.

It is generated from these files:

github.com/luci/luci-go/scheduler/appengine/messages/cron.proto

It has these top-level messages:

Acl
AclSet
Job
Trigger
NoopTask
GitilesTask
UrlFetchTask
SwarmingTask
BuildbucketTask
ProjectConfig
TaskDefWrapper

Index

Constants

This section is empty.

Variables

View Source
var Acl_Role_name = map[int32]string{
	0: "READER",
	1: "OWNER",
}
View Source
var Acl_Role_value = map[string]int32{
	"READER": 0,
	"OWNER":  1,
}

Functions

This section is empty.

Types

type Acl

type Acl struct {
	// Role denotes a list of actions that an identity can perform.
	Role Acl_Role `protobuf:"varint,1,opt,name=role,enum=messages.Acl_Role" json:"role,omitempty"`
	// Either email or "group:xyz" or auth service identity string "kind:name".
	GrantedTo string `protobuf:"bytes,2,opt,name=granted_to,json=grantedTo" json:"granted_to,omitempty"`
}

A single access control rule.

WARNING: until ACLs are fully deployed, DO NOT rely on READER Role limiting access to your project. Follow crbug/736770 if in doubt. TODO(tandrii): REMOVE THIS WARNING once deployment is complete.

func (*Acl) Descriptor

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

func (*Acl) GetGrantedTo

func (m *Acl) GetGrantedTo() string

func (*Acl) GetRole

func (m *Acl) GetRole() Acl_Role

func (*Acl) ProtoMessage

func (*Acl) ProtoMessage()

func (*Acl) Reset

func (m *Acl) Reset()

func (*Acl) String

func (m *Acl) String() string

type AclSet

type AclSet struct {
	// A name of the ACL set, unique for a project.
	// Required. Must match regex '^[0-9A-Za-z_\-\.]{1,100}$'.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// List of access control rules.
	// The order does not matter.
	Acls []*Acl `protobuf:"bytes,2,rep,name=acls" json:"acls,omitempty"`
}

A set of Acl messages. Can be referenced in a Job or Trigger by name.

func (*AclSet) Descriptor

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

func (*AclSet) GetAcls

func (m *AclSet) GetAcls() []*Acl

func (*AclSet) GetName

func (m *AclSet) GetName() string

func (*AclSet) ProtoMessage

func (*AclSet) ProtoMessage()

func (*AclSet) Reset

func (m *AclSet) Reset()

func (*AclSet) String

func (m *AclSet) String() string

type Acl_Role

type Acl_Role int32
const (
	// Can do read-only operations, such as listing invocations of a Job.
	Acl_READER Acl_Role = 0
	// Same as READER + can modify state of a Job or Invocation such as
	// triggering or aborting them.
	// LUCI scheduler (this service) is an OWNER of each `Job` and `Trigger`, thus
	// `Trigger`s are allowed to trigger all `Job`s defined in the same
	// project, regardless of their respective ACLs.
	Acl_OWNER Acl_Role = 1
)

func (Acl_Role) EnumDescriptor

func (Acl_Role) EnumDescriptor() ([]byte, []int)

func (Acl_Role) String

func (x Acl_Role) String() string

type BuildbucketTask

type BuildbucketTask struct {
	// Server is URL of the bulildbucket service to use.
	Server string `protobuf:"bytes,1,opt,name=server" json:"server,omitempty"`
	// Bucket defines what bucket to add the task to.
	Bucket string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"`
	// Builder defines what to run.
	Builder string `protobuf:"bytes,3,opt,name=builder" json:"builder,omitempty"`
	// Properties is arbitrary "key:value" pairs describing the task.
	Properties []string `protobuf:"bytes,4,rep,name=properties" json:"properties,omitempty"`
	// Tags is a list of tags (as "key:value" pairs) to assign to the task.
	Tags []string `protobuf:"bytes,5,rep,name=tags" json:"tags,omitempty"`
}

BuildbucketTask specifies parameters of Buildbucket-based jobs.

func (*BuildbucketTask) Descriptor

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

func (*BuildbucketTask) GetBucket

func (m *BuildbucketTask) GetBucket() string

func (*BuildbucketTask) GetBuilder

func (m *BuildbucketTask) GetBuilder() string

func (*BuildbucketTask) GetProperties

func (m *BuildbucketTask) GetProperties() []string

func (*BuildbucketTask) GetServer

func (m *BuildbucketTask) GetServer() string

func (*BuildbucketTask) GetTags

func (m *BuildbucketTask) GetTags() []string

func (*BuildbucketTask) ProtoMessage

func (*BuildbucketTask) ProtoMessage()

func (*BuildbucketTask) Reset

func (m *BuildbucketTask) Reset()

func (*BuildbucketTask) String

func (m *BuildbucketTask) String() string

type GitilesTask

type GitilesTask struct {
	// Repo is the URL of the Gitiles repository.
	Repo string `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
	// List of Git references to track.
	Refs []string `protobuf:"bytes,2,rep,name=refs" json:"refs,omitempty"`
}

GitilesTask specifies parameters of Swarming-based jobs.

func (*GitilesTask) Descriptor

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

func (*GitilesTask) GetRefs

func (m *GitilesTask) GetRefs() []string

func (*GitilesTask) GetRepo

func (m *GitilesTask) GetRepo() string

func (*GitilesTask) ProtoMessage

func (*GitilesTask) ProtoMessage()

func (*GitilesTask) Reset

func (m *GitilesTask) Reset()

func (*GitilesTask) String

func (m *GitilesTask) String() string

type Job

type Job struct {
	// Id is a name of the job (unique for the project).
	//
	// Must match '^[0-9A-Za-z_\-\.]{1,100}$'.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Schedule describes when to run the job.
	//
	// Supported kinds of schedules (illustrated by examples):
	//   - "* 0 * * * *": standard cron-like expression. Cron engine will attempt
	//     to start a job at specified moments in time (based on UTC clock). If
	//     when triggering a job, previous invocation is still running, an overrun
	//     will be recorded (and next attempt to start a job happens based on the
	//     schedule, not when the previous invocation finishes). This is absolute
	//     schedule (i.e. doesn't depend on job state).
	//   - "with 10s interval": runs invocations in a loop, waiting 10s after
	//     finishing invocation before starting a new one. This is relative
	//     schedule. Overruns are not possible.
	//   - "continuously" is alias for "with 0s interval", meaning the job will
	//     run in a loop without any pauses.
	//   - "triggered" schedule indicates that job is only started via "Run now"
	//     button or via a trigger.
	//
	// Default is "triggered".
	Schedule string `protobuf:"bytes,2,opt,name=schedule" json:"schedule,omitempty"`
	// Disabled is true to disable this job.
	Disabled bool `protobuf:"varint,3,opt,name=disabled" json:"disabled,omitempty"`
	// Task defines what exactly to execute.
	//
	// TODO(vadimsh): Remove this field once all configs are updated not to
	// use it.
	Task *TaskDefWrapper `protobuf:"bytes,4,opt,name=task" json:"task,omitempty"`
	// List of access control rules for the Job.
	// The order does not matter.
	// There can be at most 32 different acls for a Job, including those from
	// acl_sets.
	Acls []*Acl `protobuf:"bytes,5,rep,name=acls" json:"acls,omitempty"`
	// A list of ACL set names. Each ACL in each referenced ACL set will be
	// included in this Job.
	// The order does not matter.
	AclSets []string `protobuf:"bytes,6,rep,name=acl_sets,json=aclSets" json:"acl_sets,omitempty"`
	// Noop is used for testing. It is "do nothing" task.
	Noop *NoopTask `protobuf:"bytes,100,opt,name=noop" json:"noop,omitempty"`
	// UrlFetch can be used to make a simple HTTP call.
	UrlFetch *UrlFetchTask `protobuf:"bytes,101,opt,name=url_fetch,json=urlFetch" json:"url_fetch,omitempty"`
	// SwarmingTask can be used to schedule swarming job.
	Swarming *SwarmingTask `protobuf:"bytes,102,opt,name=swarming" json:"swarming,omitempty"`
	// BuildbucketTask can be used to schedule buildbucket job.
	Buildbucket *BuildbucketTask `protobuf:"bytes,103,opt,name=buildbucket" json:"buildbucket,omitempty"`
}

Job specifies a single regular job belonging to a project.

Such jobs runs on a schedule or can be triggered by some trigger.

func (*Job) Descriptor

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

func (*Job) GetAclSets

func (m *Job) GetAclSets() []string

func (*Job) GetAcls

func (m *Job) GetAcls() []*Acl

func (*Job) GetBuildbucket

func (m *Job) GetBuildbucket() *BuildbucketTask

func (*Job) GetDisabled

func (m *Job) GetDisabled() bool

func (*Job) GetId

func (m *Job) GetId() string

func (*Job) GetNoop

func (m *Job) GetNoop() *NoopTask

func (*Job) GetSchedule

func (m *Job) GetSchedule() string

func (*Job) GetSwarming

func (m *Job) GetSwarming() *SwarmingTask

func (*Job) GetTask

func (m *Job) GetTask() *TaskDefWrapper

func (*Job) GetUrlFetch

func (m *Job) GetUrlFetch() *UrlFetchTask

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

type NoopTask

type NoopTask struct {
}

NoopTask is used for testing. It is "do nothing" task.

func (*NoopTask) Descriptor

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

func (*NoopTask) ProtoMessage

func (*NoopTask) ProtoMessage()

func (*NoopTask) Reset

func (m *NoopTask) Reset()

func (*NoopTask) String

func (m *NoopTask) String() string

type ProjectConfig

type ProjectConfig struct {
	// Job is a set of jobs defined in the project.
	Job []*Job `protobuf:"bytes,1,rep,name=job" json:"job,omitempty"`
	// Trigger is a set of triggering jobs defined in the project.
	Trigger []*Trigger `protobuf:"bytes,2,rep,name=trigger" json:"trigger,omitempty"`
	// A list of ACL sets. Names must be unique.
	AclSets []*AclSet `protobuf:"bytes,3,rep,name=acl_sets,json=aclSets" json:"acl_sets,omitempty"`
}

ProjectConfig defines a schema for config file that describe jobs belonging to some project.

func (*ProjectConfig) Descriptor

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

func (*ProjectConfig) GetAclSets

func (m *ProjectConfig) GetAclSets() []*AclSet

func (*ProjectConfig) GetJob

func (m *ProjectConfig) GetJob() []*Job

func (*ProjectConfig) GetTrigger

func (m *ProjectConfig) GetTrigger() []*Trigger

func (*ProjectConfig) ProtoMessage

func (*ProjectConfig) ProtoMessage()

func (*ProjectConfig) Reset

func (m *ProjectConfig) Reset()

func (*ProjectConfig) String

func (m *ProjectConfig) String() string

type SwarmingTask

type SwarmingTask struct {
	// Server is URL of the swarming service to use.
	Server string `protobuf:"bytes,1,opt,name=server" json:"server,omitempty"`
	// What to run. Only one of 'command' or 'isolated_ref' must be given.
	Command     []string                  `protobuf:"bytes,2,rep,name=command" json:"command,omitempty"`
	IsolatedRef *SwarmingTask_IsolatedRef `protobuf:"bytes,3,opt,name=isolated_ref,json=isolatedRef" json:"isolated_ref,omitempty"`
	// Additional arguments to pass to isolated command.
	ExtraArgs []string `protobuf:"bytes,4,rep,name=extra_args,json=extraArgs" json:"extra_args,omitempty"`
	// List of "key=value" pairs with additional OS environment variables.
	Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
	// Where to run it. List of "key:value" pairs.
	Dimensions []string `protobuf:"bytes,6,rep,name=dimensions" json:"dimensions,omitempty"`
	// Tags is a list of tags (as "key:value" pairs) to assign to the task.
	Tags []string `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"`
	// Priority is task priority (or niceness, lower value - higher priority).
	Priority int32 `protobuf:"varint,8,opt,name=priority" json:"priority,omitempty"`
	// Timeouts. All optional. The scheduler will set reasonable default values.
	ExecutionTimeoutSecs int32 `protobuf:"varint,9,opt,name=execution_timeout_secs,json=executionTimeoutSecs" json:"execution_timeout_secs,omitempty"`
	GracePeriodSecs      int32 `protobuf:"varint,10,opt,name=grace_period_secs,json=gracePeriodSecs" json:"grace_period_secs,omitempty"`
	IoTimeoutSecs        int32 `protobuf:"varint,11,opt,name=io_timeout_secs,json=ioTimeoutSecs" json:"io_timeout_secs,omitempty"`
}

SwarmingTask specifies parameters of Swarming-based jobs.

func (*SwarmingTask) Descriptor

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

func (*SwarmingTask) GetCommand

func (m *SwarmingTask) GetCommand() []string

func (*SwarmingTask) GetDimensions

func (m *SwarmingTask) GetDimensions() []string

func (*SwarmingTask) GetEnv

func (m *SwarmingTask) GetEnv() []string

func (*SwarmingTask) GetExecutionTimeoutSecs

func (m *SwarmingTask) GetExecutionTimeoutSecs() int32

func (*SwarmingTask) GetExtraArgs

func (m *SwarmingTask) GetExtraArgs() []string

func (*SwarmingTask) GetGracePeriodSecs

func (m *SwarmingTask) GetGracePeriodSecs() int32

func (*SwarmingTask) GetIoTimeoutSecs

func (m *SwarmingTask) GetIoTimeoutSecs() int32

func (*SwarmingTask) GetIsolatedRef

func (m *SwarmingTask) GetIsolatedRef() *SwarmingTask_IsolatedRef

func (*SwarmingTask) GetPriority

func (m *SwarmingTask) GetPriority() int32

func (*SwarmingTask) GetServer

func (m *SwarmingTask) GetServer() string

func (*SwarmingTask) GetTags

func (m *SwarmingTask) GetTags() []string

func (*SwarmingTask) ProtoMessage

func (*SwarmingTask) ProtoMessage()

func (*SwarmingTask) Reset

func (m *SwarmingTask) Reset()

func (*SwarmingTask) String

func (m *SwarmingTask) String() string

type SwarmingTask_IsolatedRef

type SwarmingTask_IsolatedRef struct {
	Isolated       string `protobuf:"bytes,1,opt,name=isolated" json:"isolated,omitempty"`
	IsolatedServer string `protobuf:"bytes,2,opt,name=isolated_server,json=isolatedServer" json:"isolated_server,omitempty"`
	Namespace      string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"`
}

IsolatedRef defines a data tree reference, normally a reference to an .isolated file

func (*SwarmingTask_IsolatedRef) Descriptor

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

func (*SwarmingTask_IsolatedRef) GetIsolated

func (m *SwarmingTask_IsolatedRef) GetIsolated() string

func (*SwarmingTask_IsolatedRef) GetIsolatedServer

func (m *SwarmingTask_IsolatedRef) GetIsolatedServer() string

func (*SwarmingTask_IsolatedRef) GetNamespace

func (m *SwarmingTask_IsolatedRef) GetNamespace() string

func (*SwarmingTask_IsolatedRef) ProtoMessage

func (*SwarmingTask_IsolatedRef) ProtoMessage()

func (*SwarmingTask_IsolatedRef) Reset

func (m *SwarmingTask_IsolatedRef) Reset()

func (*SwarmingTask_IsolatedRef) String

func (m *SwarmingTask_IsolatedRef) String() string

type TaskDefWrapper

type TaskDefWrapper struct {
	Noop            *NoopTask        `protobuf:"bytes,1,opt,name=noop" json:"noop,omitempty"`
	UrlFetch        *UrlFetchTask    `protobuf:"bytes,2,opt,name=url_fetch,json=urlFetch" json:"url_fetch,omitempty"`
	SwarmingTask    *SwarmingTask    `protobuf:"bytes,3,opt,name=swarming_task,json=swarmingTask" json:"swarming_task,omitempty"`
	BuildbucketTask *BuildbucketTask `protobuf:"bytes,4,opt,name=buildbucket_task,json=buildbucketTask" json:"buildbucket_task,omitempty"`
	GitilesTask     *GitilesTask     `protobuf:"bytes,5,opt,name=gitiles_task,json=gitilesTask" json:"gitiles_task,omitempty"`
}

TaskDefWrapper is a union type of all possible tasks known to the scheduler.

It is used internally when storing jobs in the datastore.

TODO(vadimsh): Remove '_task' suffixes once TaskDefWrapper is no longer a part of 'Job' proto.

func (*TaskDefWrapper) Descriptor

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

func (*TaskDefWrapper) GetBuildbucketTask

func (m *TaskDefWrapper) GetBuildbucketTask() *BuildbucketTask

func (*TaskDefWrapper) GetGitilesTask

func (m *TaskDefWrapper) GetGitilesTask() *GitilesTask

func (*TaskDefWrapper) GetNoop

func (m *TaskDefWrapper) GetNoop() *NoopTask

func (*TaskDefWrapper) GetSwarmingTask

func (m *TaskDefWrapper) GetSwarmingTask() *SwarmingTask

func (*TaskDefWrapper) GetUrlFetch

func (m *TaskDefWrapper) GetUrlFetch() *UrlFetchTask

func (*TaskDefWrapper) ProtoMessage

func (*TaskDefWrapper) ProtoMessage()

func (*TaskDefWrapper) Reset

func (m *TaskDefWrapper) Reset()

func (*TaskDefWrapper) String

func (m *TaskDefWrapper) String() string

type Trigger

type Trigger struct {
	// Id is a name of the job (unique for the project).
	//
	// Must match '^[0-9A-Za-z_\-\.]{1,100}$'. It's in the same namespace as
	// regular jobs.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Schedule describes when to run this triggering job.
	//
	// See Job.schedule fro more info. Default is "with 30s interval".
	Schedule string `protobuf:"bytes,2,opt,name=schedule" json:"schedule,omitempty"`
	// Disabled is true to disable this job.
	Disabled bool `protobuf:"varint,3,opt,name=disabled" json:"disabled,omitempty"`
	// List of access control rules for the Job.
	// The order does not matter.
	// There can be at most 32 different acls for a Job, including those from
	// acl_sets.
	Acls []*Acl `protobuf:"bytes,4,rep,name=acls" json:"acls,omitempty"`
	// A list of ACL set names. Each ACL in each referenced ACL set will be
	// included in this Job.
	// The order does not matter.
	AclSets []string `protobuf:"bytes,5,rep,name=acl_sets,json=aclSets" json:"acl_sets,omitempty"`
	// Noop is used for testing. It is "do nothing" trigger.
	Noop *NoopTask `protobuf:"bytes,100,opt,name=noop" json:"noop,omitempty"`
	// Gitiles is used to trigger jobs for new commits on Gitiles.
	Gitiles *GitilesTask `protobuf:"bytes,101,opt,name=gitiles" json:"gitiles,omitempty"`
}

Trigger specifies a job that triggers other jobs.

It is a special kind of job that periodically checks the state of the world and triggers other jobs.

func (*Trigger) Descriptor

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

func (*Trigger) GetAclSets

func (m *Trigger) GetAclSets() []string

func (*Trigger) GetAcls

func (m *Trigger) GetAcls() []*Acl

func (*Trigger) GetDisabled

func (m *Trigger) GetDisabled() bool

func (*Trigger) GetGitiles

func (m *Trigger) GetGitiles() *GitilesTask

func (*Trigger) GetId

func (m *Trigger) GetId() string

func (*Trigger) GetNoop

func (m *Trigger) GetNoop() *NoopTask

func (*Trigger) GetSchedule

func (m *Trigger) GetSchedule() string

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) Reset

func (m *Trigger) Reset()

func (*Trigger) String

func (m *Trigger) String() string

type UrlFetchTask

type UrlFetchTask struct {
	// Method is HTTP method to use, such as "GET" or "POST". Default is "GET".
	Method string `protobuf:"bytes,1,opt,name=method" json:"method,omitempty"`
	// Url to send the request to.
	Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
	// Timeout is how long to wait for request to complete. Default is 60 sec.
	TimeoutSec int32 `protobuf:"varint,3,opt,name=timeout_sec,json=timeoutSec" json:"timeout_sec,omitempty"`
}

UrlFetchTask specifies parameters for simple HTTP call.

func (*UrlFetchTask) Descriptor

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

func (*UrlFetchTask) GetMethod

func (m *UrlFetchTask) GetMethod() string

func (*UrlFetchTask) GetTimeoutSec

func (m *UrlFetchTask) GetTimeoutSec() int32

func (*UrlFetchTask) GetUrl

func (m *UrlFetchTask) GetUrl() string

func (*UrlFetchTask) ProtoMessage

func (*UrlFetchTask) ProtoMessage()

func (*UrlFetchTask) Reset

func (m *UrlFetchTask) Reset()

func (*UrlFetchTask) String

func (m *UrlFetchTask) String() string

Jump to

Keyboard shortcuts

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