package
0.3.0
Repository: https://github.com/tinyci/ci-agents.git
Documentation: pkg.go.dev

# Functions

MakeStatus returns nil if set is false and the bool is false, indicating that it is not set.
MakeTime takes a protobuf timestamp and makes a time.Time out of it.
MakeTimestamp takes a time.Time and makes a protobuf timestamp out of it.
MakeUserList returns the inverse of MakeUsers.
MakeUsers converts a proto userlist to a model one.
MapError finds an error by string and returns an appropriate Error for it.
New returns the model structure after the db connection work has taken place.
NewQueueItemFromProto converts in the opposite direction of ToProto.
NewRefFromProto converts a proto ref to a real ref.
NewRepositoryFromProto converts a proto repository to a model repository.
NewRunFromProto yields a new run from a protobuf message.
NewSessionFromProto returns a session from a protobuf representation.
NewSubmissionFromProto converts the proto representation to the task type.
NewTaskFromProto converts the proto representation to the task type.
NewUserErrorFromProto converts a user error from proto to canonical representation.
NewUserFromProto converts a proto user to a real user.

# Constants

CapabilityCancel allows cancels.
CapabilityModifyCI is required for modifying CI properties such as adding or removing a repo.
CapabilityModifyUser allows you to modify users; including caps.
CapabilitySubmit allows manual submissions.

# Variables

AllCapabilities comprises the superuser account's list of capabilities.
OAuthExpiration is a constant for the oauth state expiration time.
TokenCryptKey is the standard token crypt key.

# Structs

Model is the outer layer of our internal database model, which will primarily be used by the data service.
OAuth schema is for checking state return values from github.
QueueItem represents an item in the queue table in the database.
Ref encapsulates git ref -- sha or branch name -- which is tied to a task (and multiple runs, potentially).
Repository is the encapsulation of a git repository.
Run is the individual parallel run.
Session corresponds to the `sessions` table and encapsulates a web session.
Submission is the concrete type for a test submission, unlike types/submission.go which is the ephemeral type for messages and so on.
Task is the organizational unit of a single source-controlled directory.
User is a user record.
UserError is the encapsulation of many errors that need to be presented to the user.

# Type aliases

Capability is a type of access gating mechanism.
RepositoryList conforms to the sort.Interface interface.