Go API Documentation

github.com/semaphoreui/semaphore/services/project

No package summary is available.

Package

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

Types

BackupAccessKey

This type doesn't have documentation.

Field name Field type Comment

db.AccessKey

No comment on field.

BackupDB

This type doesn't have documentation.

Field name Field type Comment
meta

db.Project

No comment on field.
templates

[]db.Template

No comment on field.
repositories

[]db.Repository

No comment on field.
keys

[]db.AccessKey

No comment on field.
views

[]db.View

No comment on field.
inventories

[]db.Inventory

No comment on field.
environments

[]db.Environment

No comment on field.
schedules

[]db.Schedule

No comment on field.
integrationProjAliases

[]db.IntegrationAlias

No comment on field.
integrations

[]db.Integration

No comment on field.
integrationAliases

map[int][]db.IntegrationAlias

No comment on field.
integrationMatchers

map[int][]db.IntegrationMatcher

No comment on field.
integrationExtractValues

map[int][]db.IntegrationExtractValue

No comment on field.

BackupEntry

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.

BackupEnvironment

This type doesn't have documentation.

Field name Field type Comment

db.Environment

No comment on field.

BackupFormat

This type doesn't have documentation.

Field name Field type Comment
Meta

BackupMeta

No comment on field.
Templates

[]BackupTemplate

No comment on field.
Repositories

[]BackupRepository

No comment on field.
Keys

[]BackupAccessKey

No comment on field.
Views

[]BackupView

No comment on field.
Inventories

[]BackupInventory

No comment on field.
Environments

[]BackupEnvironment

No comment on field.
Integration

[]BackupIntegration

No comment on field.
IntegrationAliases

[]string

No comment on field.
Schedules

[]BackupSchedule

No comment on field.

BackupIntegration

This type doesn't have documentation.

Field name Field type Comment

db.Integration

No comment on field.
Aliases

[]string

No comment on field.
Matchers

[]db.IntegrationMatcher

No comment on field.
ExtractValues

[]db.IntegrationExtractValue

No comment on field.
Template

string

No comment on field.
AuthSecret

*string

No comment on field.

BackupInventory

This type doesn't have documentation.

Field name Field type Comment

db.Inventory

No comment on field.
SSHKey

*string

No comment on field.
BecomeKey

*string

No comment on field.

BackupMeta

This type doesn't have documentation.

Field name Field type Comment

db.Project

No comment on field.

BackupRepository

This type doesn't have documentation.

Field name Field type Comment

db.Repository

No comment on field.
SSHKey

*string

No comment on field.

BackupSchedule

This type doesn't have documentation.

Field name Field type Comment

db.Schedule

No comment on field.
Template

string

No comment on field.

BackupTemplate

This type doesn't have documentation.

Field name Field type Comment

db.Template

No comment on field.
Inventory

*string

No comment on field.
Repository

string

No comment on field.
Environment

*string

No comment on field.
BuildTemplate

*string

No comment on field.
View

*string

No comment on field.
Vaults

[]BackupTemplateVault

No comment on field.
Cron

*string

No comment on field.
VaultKey

*string

Deprecated: Left here for compatibility with old backups

BackupTemplateVault

This type doesn't have documentation.

Field name Field type Comment

db.TemplateVault

No comment on field.
VaultKey

*string

No comment on field.

BackupView

This type doesn't have documentation.

Field name Field type Comment

db.View

No comment on field.

Functions

func GetBackup

func (*BackupFormat) Marshal

Uses: json.Marshal, reflect.ValueOf.

func (*BackupFormat) Restore

Uses: db.IntegrationAlias, db.ProjectOwner, db.ProjectUser, fmt.Errorf.

func (*BackupFormat) Unmarshal

Uses: json.Unmarshal, reflect.ValueOf.

func (*BackupFormat) Verify

Uses: fmt.Errorf.

func (BackupAccessKey) GetName

func (BackupAccessKey) Restore

func (BackupAccessKey) Verify

func (BackupEnvironment) GetName

func (BackupEnvironment) Restore

func (BackupEnvironment) Verify

func (BackupIntegration) Restore

Uses: db.AccessKey, db.IntegrationAlias, db.Template, fmt.Errorf.

func (BackupInventory) GetName

func (BackupInventory) Restore

Uses: db.AccessKey.

func (BackupInventory) Verify

Uses: fmt.Errorf.

func (BackupRepository) GetName

func (BackupRepository) Restore

Uses: db.AccessKey, fmt.Errorf.

func (BackupRepository) Verify

Uses: fmt.Errorf.

func (BackupSchedule) Restore

Uses: db.Template, fmt.Errorf.

func (BackupSchedule) Verify

func (BackupTemplate) GetName

func (BackupTemplate) Restore

Uses: db.AccessKey, db.Environment, db.Inventory, db.Repository, db.Schedule, db.Template, db.View, fmt.Errorf.

func (BackupTemplate) Verify

Uses: fmt.Errorf, schedules.ValidateCronFormat.

func (BackupView) GetName

func (BackupView) Restore

func (BackupView) Verify

Private functions

func findEntityByName

func findNameByID

References: fmt.Errorf.

func getEntryByName

func getRandomName

References: random.String.

func getScheduleByTemplate

func getSchedulesByProject

References: db.Schedule.

func makeUniqueNames

func marshalValue

References: fmt.Sprintf, reflect.Array, reflect.Map, reflect.Ptr, reflect.Slice, reflect.Struct.

func setBasicType

References: fmt.Errorf, reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int8, reflect.String, reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint8.

func toFloat64

func unmarshalStructWithBackupTags

func unmarshalValueWithBackupTags

References: db.MapStringAnyField, fmt.Errorf, reflect.MakeMap, reflect.MakeSlice, reflect.Map, reflect.New, reflect.Ptr, reflect.Slice, reflect.Struct, reflect.TypeOf, reflect.ValueOf.

func verifyDuplicate

References: fmt.Errorf.

func format

References: db.AccessKey, db.Environment, db.Inventory, db.Repository, db.SurveyVar, db.Template, db.View, json.Unmarshal.

func load

References: db.IntegrationAlias, db.IntegrationExtractValue, db.IntegrationMatcher, db.InventoryType, db.RetrieveQueryParams, db.TemplateFilter, db.TemplateVault.

func makeUniqueNames

References: db.AccessKey, db.Environment, db.Integration, db.Inventory, db.Repository, db.Schedule, db.Template, db.View.


Tests

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

Types

testItem

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.

Test functions

TestBackupProject

References: assert.Equal, assert.NoError, bolt.CreateTestStore, db.AccessKey, db.AccessKeyNone, db.Environment, db.Inventory, db.Project, db.Repository, db.Template, db.User, db.UserWithPwd, util.Config, util.ConfigType.

TestMakeUniqueNames

References: assert.True.

Test_MarshalValue_NilPointer_ReturnsNil

References: assert.Nil, assert.NoError, reflect.ValueOf.

Test_MarshalValue_Slice_ReturnsSlice

References: assert.Equal, assert.NoError, reflect.ValueOf.

Test_MarshalValue_StructWithFields_ReturnsMap

References: assert.Equal, assert.NoError, reflect.ValueOf.

Test_SetBasicType_InvalidType_ReturnsError

References: assert.Error, reflect.Value.

Test_ToFloat64_InvalidType_ReturnsFalse

References: assert.False.

Test_ToFloat64_ValidInt_ReturnsFloat64

References: assert.Equal, assert.True.

Test_UnmarshalValueWithBackupTags_Map_SetsEntries

References: assert.Equal, assert.NoError, reflect.ValueOf.

Test_UnmarshalValueWithBackupTags_Slice_SetsElements

References: assert.Equal, assert.NoError, reflect.ValueOf.

Test_UnmarshalValueWithBackupTags_StructWithFields_SetsFields

References: assert.NoError, db.MapStringAnyField, reflect.ValueOf.