Go API Documentation

github.com/semaphoreui/semaphore/db

No package summary is available.

Package

Files: 18. Third party imports: 2. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Constants

Vars

Types

APIToken

APIToken is given to a user to allow API access

Field name Field type Comment
ID

string

No comment on field.
Created

time.Time

No comment on field.
Expired

bool

No comment on field.
UserID

int

No comment on field.

AccessKey

AccessKey represents a key used to access a machine with ansible from semaphore

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
Type

AccessKeyType

'ssh/login_password/none'

ProjectID

*int

No comment on field.
Secret

*string

Secret used internally, do not assign this field. You should use methods SerializeSecret to fill this field.

String

string

No comment on field.
LoginPassword

LoginPassword

No comment on field.
SshKey

SshKey

No comment on field.
OverrideSecret

bool

No comment on field.
EnvironmentID

*int

EnvironmentID is an ID of environment which owns the access key.

UserID

*int

UserID is an ID of user which owns the access key.

Empty

bool

No comment on field.

AccessKeyInstallation

This type doesn't have documentation.

Field name Field type Comment
SSHAgent

*ssh.Agent

No comment on field.
Login

string

No comment on field.
Password

string

No comment on field.
Script

string

No comment on field.

AccessKeyRole

This type doesn't have documentation.

Field name Field type Comment
type

int

No comment on field.

AccessKeyType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Alias

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Alias

string

No comment on field.
ProjectID

int

No comment on field.

Aliasable

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.

AnsibleTaskError

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
ProjectID

int

No comment on field.
Host

string

No comment on field.
Task

string

No comment on field.
Error

string

No comment on field.
Created

time.Time

No comment on field.

AnsibleTaskHost

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
ProjectID

int

No comment on field.
Host

string

No comment on field.
Changed

int

No comment on field.
Failed

int

No comment on field.
Ignored

int

No comment on field.
Ok

int

No comment on field.
Rescued

int

No comment on field.
Skipped

int

No comment on field.
Unreachable

int

No comment on field.
Created

time.Time

No comment on field.

AnsibleTaskParams

This type doesn't have documentation.

Field name Field type Comment
Debug

bool

No comment on field.
DebugLevel

int

No comment on field.
DryRun

bool

No comment on field.
Diff

bool

No comment on field.
Limit

[]string

No comment on field.
Tags

[]string

No comment on field.
SkipTags

[]string

No comment on field.

AnsibleTemplateParams

This type doesn't have documentation.

Field name Field type Comment
AllowDebug

bool

No comment on field.
AllowOverrideInventory

bool

No comment on field.
AllowOverrideLimit

bool

No comment on field.
AllowOverrideTags

bool

No comment on field.
AllowOverrideSkipTags

bool

No comment on field.
Limit

[]string

No comment on field.
Tags

[]string

No comment on field.
SkipTags

[]string

No comment on field.

BackupEntity

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.

DefaultTaskParams

This type doesn't have documentation.

Environment

Environment is used to pass additional arguments, in json form to ansible

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
ProjectID

int

No comment on field.
Password

*string

No comment on field.
JSON

string

No comment on field.
ENV

*string

No comment on field.
Secrets

[]EnvironmentSecret

Secrets is a field which used to update secrets associated with the environment.

EnvironmentSecret

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Type

EnvironmentSecretType

No comment on field.
Name

string

No comment on field.
Secret

string

No comment on field.
Operation

EnvironmentSecretOperation

No comment on field.

EnvironmentSecretOperation

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

EnvironmentSecretType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Event

Event represents information generated by ansible or api action captured to the database during execution

Field name Field type Comment
ID

int

No comment on field.
UserID

*int

No comment on field.
ProjectID

*int

No comment on field.
IntegrationID

*int

No comment on field.
ObjectID

*int

No comment on field.
ObjectType

*EventObjectType

No comment on field.
Description

*string

No comment on field.
Created

time.Time

No comment on field.
ObjectName

string

No comment on field.
ProjectName

*string

No comment on field.
Username

*string

No comment on field.

EventObjectType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Integration

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
ProjectID

int

No comment on field.
TemplateID

int

No comment on field.
AuthMethod

IntegrationAuthMethod

No comment on field.
AuthSecretID

*int

No comment on field.
AuthHeader

string

No comment on field.
AuthSecret

AccessKey

No comment on field.
Searchable

bool

No comment on field.
TaskParams

MapStringAnyField

No comment on field.

IntegrationAlias

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Alias

string

No comment on field.
ProjectID

int

No comment on field.
IntegrationID

*int

No comment on field.

IntegrationAliasLevel

This type doesn't have documentation.

Field name Field type Comment
type

int

No comment on field.

IntegrationAuthMethod

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

IntegrationBodyDataType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

IntegrationExtractValue

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
IntegrationID

int

No comment on field.
Name

string

No comment on field.
ValueSource

IntegrationExtractValueSource

No comment on field.
BodyDataType

IntegrationBodyDataType

No comment on field.
Key

string

No comment on field.
Variable

string

No comment on field.
VariableType

IntegrationVariableType

No comment on field.

IntegrationExtractValueSource

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

IntegrationExtractorChildReferrers

This type doesn't have documentation.

Field name Field type Comment
Integrations

[]ObjectReferrer

No comment on field.

IntegrationMatchMethodType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

IntegrationMatchType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

IntegrationMatcher

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
IntegrationID

int

No comment on field.
Name

string

No comment on field.
MatchType

IntegrationMatchType

No comment on field.
Method

IntegrationMatchMethodType

No comment on field.
BodyDataType

IntegrationBodyDataType

No comment on field.
Key

string

No comment on field.
Value

string

No comment on field.

IntegrationReferrers

This type doesn't have documentation.

Field name Field type Comment
IntegrationMatchers

[]ObjectReferrer

No comment on field.
IntegrationExtractValues

[]ObjectReferrer

No comment on field.

IntegrationVariableType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Inventory

Inventory is the model of an ansible inventory file

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
ProjectID

int

No comment on field.
Inventory

string

No comment on field.
SSHKeyID

*int

accesses hosts in inventory

SSHKey

AccessKey

No comment on field.
BecomeKeyID

*int

No comment on field.
BecomeKey

AccessKey

No comment on field.
Type

InventoryType

static/file

TemplateID

*int

TemplateID is an ID of template which holds the inventory It is not used now but can be used in feature for inventories which can not be used more than one template at once.

RepositoryID

*int

RepositoryID is an ID of repo where inventory stored. If null than inventory will be got from template repository.

Repository

*Repository

No comment on field.
RunnerTag

*string

RunnerTag is a tag which allow join inventory to the runner.

InventoryType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

LoginPassword

This type doesn't have documentation.

Field name Field type Comment
Login

string

No comment on field.
Password

string

No comment on field.

MapStringAnyField

This type doesn't have documentation.

Field name Field type Comment
type

map[string]any

No comment on field.

Migration

Migration represents sql schema version

Field name Field type Comment
Version

string

No comment on field.
UpgradedDate

*time.Time

No comment on field.
Notes

*string

No comment on field.

MigrationVersion

This type doesn't have documentation.

Field name Field type Comment
Major

int

No comment on field.
Minor

int

No comment on field.
Patch

int

No comment on field.

ObjectProps

ObjectProps describe database entities. It mainly used for NoSQL implementations (currently BoltDB) to preserve same data structure of different implementations and easy change it if required.

Field name Field type Comment
TableName

string

No comment on field.
Type

reflect.Type

No comment on field.
IsGlobal

bool

No comment on field.
ReferringColumnSuffix

string

No comment on field.
PrimaryColumnName

string

No comment on field.
SortableColumns

[]string

No comment on field.
DefaultSortingColumn

string

No comment on field.
SortInverted

bool

No comment on field.
Ownerships

[]*ObjectProps

No comment on field.
SelectColumns

[]string

No comment on field.

ObjectReferrer

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.

ObjectReferrers

This type doesn't have documentation.

Field name Field type Comment
Templates

[]ObjectReferrer

No comment on field.
Inventories

[]ObjectReferrer

No comment on field.
Repositories

[]ObjectReferrer

No comment on field.
Integrations

[]ObjectReferrer

No comment on field.
Schedules

[]ObjectReferrer

No comment on field.

Option

This type doesn't have documentation.

Field name Field type Comment
Key

string

No comment on field.
Value

string

No comment on field.

OwnershipFilter

This type doesn't have documentation.

Field name Field type Comment
WithoutOwnerOnly

bool

No comment on field.
TemplateID

*int

No comment on field.
EnvironmentID

*int

No comment on field.

Project

Project is the top level structure in Semaphore

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
Created

time.Time

No comment on field.
Alert

bool

No comment on field.
AlertChat

*string

No comment on field.
MaxParallelTasks

int

No comment on field.
Type

string

No comment on field.

ProjectStats

This type doesn't have documentation.

ProjectUser

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
UserID

int

No comment on field.
Role

ProjectUserRole

No comment on field.

ProjectUserPermission

This type doesn't have documentation.

Field name Field type Comment
type

int

No comment on field.

ProjectUserRole

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Repository

Repository is the model for code stored in a git repository

Field name Field type Comment
ID

int

No comment on field.
Name

string

No comment on field.
ProjectID

int

No comment on field.
GitURL

string

No comment on field.
GitBranch

string

No comment on field.
SSHKeyID

int

No comment on field.
SSHKey

AccessKey

No comment on field.

RepositoryType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

RetrieveQueryParams

This type doesn't have documentation.

Field name Field type Comment
Offset

int

No comment on field.
Count

int

No comment on field.
SortBy

string

No comment on field.
SortInverted

bool

No comment on field.
Filter

string

No comment on field.
Ownership

OwnershipFilter

No comment on field.

Runner

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Token

string

No comment on field.
ProjectID

*int

No comment on field.
Webhook

string

No comment on field.
MaxParallelTasks

int

No comment on field.
Active

bool

No comment on field.
Name

string

No comment on field.
Tag

string

No comment on field.
Touched

*time.Time

No comment on field.
CleaningRequested

*time.Time

No comment on field.
PublicKey

*string

No comment on field.

RunnerState

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

RunnerTag

This type doesn't have documentation.

Field name Field type Comment
Tag

string

No comment on field.
NumberOfRunners

int

No comment on field.

Schedule

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
TemplateID

int

No comment on field.
CronFormat

string

No comment on field.
Name

string

No comment on field.
Active

bool

No comment on field.
LastCommitHash

*string

No comment on field.
RepositoryID

*int

No comment on field.

ScheduleWithTpl

This type doesn't have documentation.

Field name Field type Comment

Schedule

No comment on field.
TemplateName

string

No comment on field.

Session

Session is a connection to the API

Field name Field type Comment
ID

int

No comment on field.
UserID

int

No comment on field.
Created

time.Time

No comment on field.
LastActive

time.Time

No comment on field.
IP

string

No comment on field.
UserAgent

string

No comment on field.
Expired

bool

No comment on field.
VerificationMethod

SessionVerificationMethod

No comment on field.
Verified

bool

No comment on field.

SessionVerificationMethod

This type doesn't have documentation.

Field name Field type Comment
type

int

No comment on field.

SshKey

This type doesn't have documentation.

Field name Field type Comment
Login

string

No comment on field.
Passphrase

string

No comment on field.
PrivateKey

string

No comment on field.

Store

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.

StringArrayField

This type doesn't have documentation.

Field name Field type Comment
type

[]string

No comment on field.

SurveyVar

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.
Title

string

No comment on field.
Required

bool

No comment on field.
Type

SurveyVarType

No comment on field.
Description

string

No comment on field.
Values

[]SurveyVarEnumValue

No comment on field.
DefaultValue

string

No comment on field.

SurveyVarEnumValue

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.
Value

string

No comment on field.

SurveyVarType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

Task

Task is a model of a task which will be executed by the runner

Field name Field type Comment
ID

int

No comment on field.
TemplateID

int

No comment on field.
ProjectID

int

No comment on field.
Status

task_logger.TaskStatus

No comment on field.
Playbook

string

override variables

Environment

string

No comment on field.
Secret

string

No comment on field.
Arguments

*string

No comment on field.
GitBranch

*string

No comment on field.
UserID

*int

No comment on field.
IntegrationID

*int

No comment on field.
ScheduleID

*int

No comment on field.
Created

time.Time

No comment on field.
Start

*time.Time

No comment on field.
End

*time.Time

No comment on field.
Message

string

No comment on field.
CommitHash

*string

CommitMessage is a git commit hash of playbook repository which was active when task was created.

CommitMessage

string

CommitMessage contains message retrieved from git repository after checkout to CommitHash. It is readonly by API.

BuildTaskID

*int

No comment on field.
Version

*string

Version is a build version. This field available only for Build tasks.

InventoryID

*int

No comment on field.
Params

MapStringAnyField

No comment on field.
Limit

string

Limit is deprecated, use Params.Limit instead

TaskFilter

This type doesn't have documentation.

Field name Field type Comment
Start

*time.Time

No comment on field.
End

*time.Time

No comment on field.
UserID

*int

No comment on field.

TaskOutput

TaskOutput is the ansible log output from the task

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
Time

time.Time

No comment on field.
Output

string

No comment on field.

TaskStage

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
Start

*time.Time

No comment on field.
End

*time.Time

No comment on field.
StartOutputID

*int

No comment on field.
EndOutputID

*int

No comment on field.
Type

TaskStageType

No comment on field.

TaskStageResult

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
StageID

int

No comment on field.
JSON

string

No comment on field.

TaskStageType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

TaskStageWithResult

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
TaskID

int

No comment on field.
Start

*time.Time

No comment on field.
End

*time.Time

No comment on field.
StartOutputID

*int

No comment on field.
EndOutputID

*int

No comment on field.
Type

TaskStageType

No comment on field.
JSON

string

No comment on field.
Result

any

No comment on field.

TaskStat

This type doesn't have documentation.

Field name Field type Comment
Date

string

No comment on field.
CountByStatus

map[task_logger.TaskStatus]int

No comment on field.
AvgDuration

int

No comment on field.

TaskStatUnit

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

TaskWithTpl

TaskWithTpl is the task data with additional fields

Field name Field type Comment

Task

No comment on field.
TemplatePlaybook

string

No comment on field.
TemplateAlias

string

No comment on field.
TemplateType

TemplateType

No comment on field.
TemplateApp

TemplateApp

No comment on field.
UserName

*string

No comment on field.
BuildTask

*Task

No comment on field.

Template

Template is a user defined model that is used to run a task

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
InventoryID

*int

No comment on field.
RepositoryID

int

No comment on field.
EnvironmentID

*int

No comment on field.
Name

string

Name as described in https://github.com/semaphoreui/semaphore/issues/188

Playbook

string

playbook name in the form of "some_play.yml"

Arguments

*string

to fit into []string

AllowOverrideArgsInTask

bool

if true, semaphore will not prepend any arguments to arguments like inventory, etc

Description

*string

No comment on field.
Vaults

[]TemplateVault

No comment on field.
Type

TemplateType

No comment on field.
StartVersion

*string

No comment on field.
BuildTemplateID

*int

No comment on field.
ViewID

*int

No comment on field.
LastTask

*TaskWithTpl

No comment on field.
Autorun

bool

No comment on field.
GitBranch

*string

override variables

SurveyVarsJSON

*string

SurveyVarsJSON used internally for read from database. It is not used for store survey vars to database. Do not use it in your code. Use SurveyVars instead.

SurveyVars

[]SurveyVar

No comment on field.
SuppressSuccessAlerts

bool

No comment on field.
App

TemplateApp

No comment on field.
Tasks

int

No comment on field.
TaskParams

MapStringAnyField

No comment on field.
RunnerTag

*string

No comment on field.
AllowOverrideBranchInTask

bool

No comment on field.

TemplateApp

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

TemplateFilter

This type doesn't have documentation.

Field name Field type Comment
ViewID

*int

No comment on field.
BuildTemplateID

*int

No comment on field.
AutorunOnly

bool

No comment on field.
App

*TemplateApp

No comment on field.

TemplateType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

TemplateVault

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
TemplateID

int

No comment on field.
VaultKeyID

*int

No comment on field.
Name

*string

No comment on field.
Type

TemplateVaultType

No comment on field.
Script

*string

No comment on field.
Vault

*AccessKey

No comment on field.

TemplateVaultType

This type doesn't have documentation.

Field name Field type Comment
type

string

No comment on field.

TerraformInventoryAlias

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
InventoryID

int

No comment on field.
AuthKeyID

int

No comment on field.
Alias

string

No comment on field.
TaskID

*int

No comment on field.

TerraformTaskParams

This type doesn't have documentation.

Field name Field type Comment
Plan

bool

No comment on field.
Destroy

bool

No comment on field.
AutoApprove

bool

No comment on field.
Upgrade

bool

No comment on field.
Reconfigure

bool

No comment on field.

TerraformTemplateParams

This type doesn't have documentation.

Field name Field type Comment
AllowDestroy

bool

No comment on field.
AllowAutoApprove

bool

No comment on field.
AutoApprove

bool

No comment on field.
OverrideBackend

bool

No comment on field.
BackendFilename

string

No comment on field.

User

User is the model for an entity which has access to the API

Field name Field type Comment
ID

int

No comment on field.
Created

time.Time

No comment on field.
Username

string

No comment on field.
Name

string

No comment on field.
Email

string

No comment on field.
Password

string

No comment on field.
Admin

bool

No comment on field.
External

bool

No comment on field.
Alert

bool

No comment on field.
Pro

bool

No comment on field.
Totp

*UserTotp

No comment on field.

UserEmailOtp

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Created

time.Time

No comment on field.
UserID

int

No comment on field.
Code

string

No comment on field.

UserTotp

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Created

time.Time

No comment on field.
UserID

int

No comment on field.
URL

string

No comment on field.
RecoveryHash

string

No comment on field.
RecoveryCode

string

No comment on field.

UserWithProjectRole

This type doesn't have documentation.

Field name Field type Comment
Role

ProjectUserRole

No comment on field.

User

No comment on field.

UserWithPwd

UserWithPwd extends User structure with field for unhashed password received from JSON.

Field name Field type Comment
Pwd

string

No comment on field.

User

No comment on field.

ValidationError

This type doesn't have documentation.

Field name Field type Comment
Message

string

No comment on field.

View

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
ProjectID

int

No comment on field.
Title

string

No comment on field.
Position

int

No comment on field.

Functions

func ConvertFlatToNested

Uses: strings.Split.

func FillConfigFromDB

Uses: util.AssignMapToStruct, util.Config.

func FillEnvironmentSecrets

Uses: strings.HasPrefix, strings.TrimPrefix.

func FillEvents

func FillIntegration

func FillInventory

func FillTemplate

Uses: json.Unmarshal.

func FillTemplateVault

func GetMigrations

func GetParsedTime

GetParsedTime returns the timestamp as it will retrieved from the database This allows us to create timestamp consistency on return values from create requests

Uses: log.Error, time.Parse.

func Migrate

Uses: fmt.Printf, fmt.Println, tz.Now.

func ObjectToJSON

Uses: json.Marshal, reflect.Ptr, reflect.Slice, reflect.ValueOf.

func Rollback

Uses: fmt.Println, slices.Reverse.

func StoreSession

func ValidateInventory

func ValidateOptionKey

Uses: fmt.Errorf, regexp.Match.

func ValidateRepository

func ValidateUser

func (*AccessKey) DeserializeSecret

Uses: util.Config.

func (*AccessKey) DeserializeSecret2

Uses: aes.NewCipher, base64.StdEncoding, cipher.NewGCM, fmt.Errorf, json.SyntaxError.

func (*AccessKey) Install

Uses: fmt.Errorf, ssh.Agent.

func (*AccessKey) SerializeSecret

Uses: aes.NewCipher, base64.StdEncoding, cipher.NewGCM, fmt.Errorf, io.ReadFull, json.Marshal, rand.Reader, util.Config.

func (*AccessKey) Validate

Uses: fmt.Errorf.

func (*AccessKeyInstallation) Destroy

func (*AccessKeyInstallation) GetGitEnv

Uses: fmt.Sprintf, fmt.Sprintln, util.Config.

func (*Environment) Validate

func (*EnvironmentSecret) Validate

Uses: errors.New.

func (*Integration) Validate

func (*IntegrationExtractValue) String

Uses: strconv.Itoa, strings.Builder.

func (*IntegrationExtractValue) Validate

func (*IntegrationMatcher) String

Uses: strconv.Itoa, strings.Builder.

func (*IntegrationMatcher) Validate

func (*MapStringAnyField) Scan

Uses: errors.New, json.Unmarshal.

func (*OwnershipFilter) GetOwnerID

func (*OwnershipFilter) SetOwnerID

func (*RetrieveQueryParams) Validate

func (*Session) IsVerified

func (*StringArrayField) Scan

Uses: errors.New, json.Unmarshal.

func (*StringArrayField) Value

Value implements the driver.Valuer interface for MapStringAnyField

Uses: json.Marshal.

func (*Task) FillParams

Uses: json.Marshal, json.Unmarshal.

func (*Task) GetIncomingVersion

func (*Task) GetUrl

Uses: fmt.Sprintf, util.Config.

func (*Task) PreInsert

PreInsert is a hook which is called before inserting task into database. Called directly in BoltDB implementation.

Uses: strings.Split, strings.TrimSpace, tz.In.

func (*Task) PreUpdate

Uses: tz.In.

func (*Task) ValidateNewTask

func (*TaskWithTpl) Fill

Uses: errors.Is.

func (*Template) CanOverrideInventory

func (*Template) FillParams

Uses: json.Marshal, json.Unmarshal.

func (*Template) Validate

Uses: json.Valid.

func (*ValidationError) Error

func (*View) Validate

func (AccessKey) GetID

func (AccessKey) GetName

func (Environment) GetID

func (Environment) GetName

func (Event) ToFields

Uses: log.Fields.

func (IntegrationAlias) ToAlias

func (Inventory) GetFilename

func (Inventory) GetID

func (Inventory) GetName

func (Inventory) Validate

func (InventoryType) IsStatic

func (MapStringAnyField) Value

Value implements the driver.Valuer interface for MapStringAnyField DO NOT ADD *, It breaks method call

Uses: json.Marshal.

func (Migration) Compare

func (Migration) HumanoidVersion

HumanoidVersion adds a v to the VersionString

func (Migration) ParseVersion

Uses: fmt.Errorf, strconv.Atoi, strings.Split.

func (Migration) Validate

Uses: fmt.Errorf.

func (MigrationVersion) Compare

func (ObjectProps) GetReferringFieldsFrom

Uses: reflect.Struct, strings.HasSuffix.

func (ProjectUserRole) Can

func (ProjectUserRole) GetPermissions

func (ProjectUserRole) IsValid

func (Repository) ClearCache

Uses: util.ClearDir, util.Config.

func (Repository) GetDirName

Uses: strconv.Itoa.

func (Repository) GetFullPath

Uses: path.Join, util.Config.

func (Repository) GetGitURL

Uses: fmt.Errorf, regexp.MustCompile.

func (Repository) GetID

func (Repository) GetName

func (Repository) GetType

Uses: regexp.MustCompile, strings.HasPrefix.

func (Repository) Validate

func (Schedule) GetName

func (Template) GetID

func (Template) GetName

func (TemplateApp) HasInventoryType

func (TemplateApp) InventoryTypes

func (TemplateApp) IsTerraform

func (TemplateApp) NeedTaskAlias

func (TerraformInventoryAlias) ToAlias

func (View) GetID

func (View) GetName

Private functions

func containsStr

func getEventObjectName

func getEventUsername

func validateJSON

References: errors.New, json.Unmarshal.

func startSSHAgent

References: fmt.Sprintf, path.Join, random.String, ssh.Agent, ssh.AgentKey, util.Config.

func unmarshalAppropriateField

References: json.Unmarshal.

func getDirNamePrefix

References: strconv.Itoa.


Tests

Files: 6. Third party imports: 2. Imports from organisation: 0. Tests: 18. Benchmarks: 0.

Test functions

TestConfig_assignMapToStruct

References: util.AssignMapToStruct.

TestGetSecret

References: base64.StdEncoding, util.Config, util.ConfigType.

TestObjectToJSON

References: assert.Equal, assert.NotNil.

TestObjectToJSON2

References: assert.Nil.

TestObjectToJSON3

References: assert.Equal, assert.NotNil.

TestProjectUsers_RoleCan

References: assert.False, assert.True.

TestRepository_ClearCache

References: assert.True, os.IsNotExist, os.MkdirAll, os.Stat, os.TempDir, path.Join, rand.Intn, require.Error, require.NoError, util.Config, util.ConfigType, util.RandString.

TestRepository_GetGitURL

References: assert.Equal.

TestRepository_GetSchema

References: assert.Equal.

TestSetGetSecretWithEncryption

References: util.Config, util.ConfigType.

TestSetSecret

References: base64.StdEncoding, util.Config, util.ConfigType.

Test_EnvironmentValidate_EmptyJsonName_ReturnsError

References: assert.Equal, assert.Error.

Test_EnvironmentValidate_EmptyName_ReturnsError

References: assert.Equal, assert.Error.

Test_EnvironmentValidate_InvalidEnvJSON_ReturnsError

References: assert.Equal, assert.Error.

Test_EnvironmentValidate_InvalidJSON_ReturnsError

References: assert.Equal, assert.Error.

Test_EnvironmentValidate_NonScalarEnvValues_ReturnsError

References: assert.Equal, assert.Error.

Test_EnvironmentValidate_ValidEnvJSON_ReturnsNoError

References: assert.NoError.

Test_EnvironmentValidate_ValidJSON_ReturnsNoError

References: assert.NoError.