Documentation
¶
Overview ¶
Package entities contains helper functions to convert to and from validate and print the Entity protobuf enum
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntityTypeFromDB ¶
EntityTypeFromDB returns the entity type from the database entity
func EntityTypeToDB ¶
EntityTypeToDB returns the database entity from the protobuf entity type
func FromString ¶
FromString returns the Entity enum from a string. Typically used in CLI when constructing a protobuf message
func IsValidEntity ¶
IsValidEntity returns true if the entity type is valid
func KnownTypesCSV ¶
func KnownTypesCSV() string
KnownTypesCSV returns a comma separated list of known entity types. Useful for UI
Types ¶
type EntityType ¶
type EntityType string
EntityType is the type of entity
const ( // RepositoryEntity is a repository entity RepositoryEntity EntityType = "repository" // BuildEnvironmentEntity is a build environment entity BuildEnvironmentEntity EntityType = "build_environment" // ArtifactEntity is an artifact entity ArtifactEntity EntityType = "artifact" // PullRequestEntity is a pull request entity PullRequestEntity EntityType = "pull_request" // UnknownEntity is an explicitly unknown entity UnknownEntity EntityType = "unknown" )
Entity types as string-like enums. Used in CLI and other user-facing code
func (EntityType) String ¶
func (e EntityType) String() string
String returns the string representation of the entity type