Help us shape the future of Go! Take the 2026 Go Developer Survey

assets

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: BSD-3-Clause Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthentifyRequest

func AuthentifyRequest(t *testing.T, req *http.Request, _ *sdk.AuthentifiedUser, jwt string)

AuthentifyRequest have to be used only for tests

func DeleteAdmins

func DeleteAdmins(t *testing.T, db gorp.SqlExecutor)

DeleteAdmins delete all cds admins from database.

func DeleteConsumers

func DeleteConsumers(t *testing.T, db gorp.SqlExecutor)

DeleteConsumers delete all cds consumers from database.

func DeleteTestGroup

func DeleteTestGroup(t *testing.T, db gorp.SqlExecutor, g *sdk.Group)

DeleteTestGroup delete a test group.

func DeleteTestProject

func DeleteTestProject(t *testing.T, db gorp.SqlExecutor, store cache.Store, key string) error

DeleteTestProject delete a test project

func GetBuiltinOrPluginActionByName

func GetBuiltinOrPluginActionByName(t *testing.T, db gorp.SqlExecutor, name string) *sdk.Action

GetBuiltinOrPluginActionByName returns a builtin or plugin action for given name if exists.

func InsertAdminUser

func InsertAdminUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)

InsertAdminUser have to be used only for tests.

func InsertGroup

func InsertGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx) *sdk.Group

func InsertLambdaUser

func InsertLambdaUser(t *testing.T, db gorpmapper.SqlExecutorWithTx, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)

InsertLambdaUser have to be used only for tests.

func InsertLambdaUserInOrganization added in v0.53.0

func InsertLambdaUserInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, orgaName string, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)

InsertLambdaUserInOrganization have to be used only for tests.

func InsertMaintainerUser

func InsertMaintainerUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)

InsertMaintainerUser have to be used only for tests.

func InsertRBAcProject added in v0.52.0

func InsertRBAcProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string, user sdk.AuthentifiedUser)

func InsertRBAcPublicProject added in v0.53.0

func InsertRBAcPublicProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string)

func InsertRBAcRegion added in v0.55.0

func InsertRBAcRegion(t *testing.T, db gorpmapper.SqlExecutorWithTx, org, regionName, role string, user sdk.AuthentifiedUser)

func InsertRBAcVariableSet added in v0.55.0

func InsertRBAcVariableSet(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string, vsName string, user sdk.AuthentifiedUser)

func InsertRBAcWorkflow added in v0.55.2

func InsertRBAcWorkflow(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey, workflow string, user sdk.AuthentifiedUser)

func InsertService

func InsertService(t *testing.T, db gorpmapper.SqlExecutorWithTx, name, serviceType string, scopes ...sdk.AuthConsumerScope) (*sdk.Service, *rsa.PrivateKey)

func InsertTestGroup

func InsertTestGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string) *sdk.Group

InsertTestGroup create a test group

func InsertTestGroupInOrganization added in v0.53.0

func InsertTestGroupInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, orgaName string) *sdk.Group

InsertTestGroupInOrganization create a test group

func InsertTestProject

func InsertTestProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, key, name string) *sdk.Project

InsertTestProject create a test project.

func InsertTestProjectRepository added in v0.53.0

func InsertTestProjectRepository(t *testing.T, db gorpmapper.SqlExecutorWithTx, pKey string, vcsServerID string, name string) *sdk.ProjectRepository

func InsertTestVCSProject added in v0.52.0

func InsertTestVCSProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, projID int64, name string, vcsType string) *sdk.VCSProject

func InsertTestWorkflow

func InsertTestWorkflow(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, proj *sdk.Project, name string) *sdk.Workflow

func InsertWorker added in v0.53.0

func InsertWorker(t *testing.T, ctx context.Context, db gorpmapper.SqlExecutorWithTx, hatcheryConsumer *sdk.AuthHatcheryConsumer, hatch sdk.Hatchery, workerName string, jobRun sdk.V2WorkflowRunJob) (*sdk.V2Worker, string)

func InsertWorkerModel

func InsertWorkerModel(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, groupID int64) *sdk.Model

func NewAction

func NewAction(id int64, ps ...sdk.Parameter) sdk.Action

NewAction returns an enabled action.

func NewAuthentifiedRequest

func NewAuthentifiedRequest(t *testing.T, _ *sdk.AuthentifiedUser, pass, method, uri string, i interface{}) *http.Request

NewAuthentifiedRequest prepare a request

func NewAuthentifiedStringRequest added in v0.53.0

func NewAuthentifiedStringRequest(t *testing.T, _ *sdk.AuthentifiedUser, pass, method, uri string, i string) *http.Request

func NewJWTAuthentifiedMultipartRequest

func NewJWTAuthentifiedMultipartRequest(t *testing.T, jwt string, method, uri string, path string, fileName string, params map[string]string) *http.Request

func NewJWTAuthentifiedRequest

func NewJWTAuthentifiedRequest(t *testing.T, jwt string, method, uri string, i interface{}, mods ...cdsclient.RequestModifier) *http.Request

NewJWTAuthentifiedRequest prepare a request

func NewRequest

func NewRequest(t *testing.T, method, uri string, i interface{}) *http.Request

func NewUploadFileRequest

func NewUploadFileRequest(t *testing.T, method string, uri string, body io.Reader, headers map[string]string) *http.Request

func NewXSRFJWTAuthentifiedRequest

func NewXSRFJWTAuthentifiedRequest(t *testing.T, jwt, xsrf string, method, uri string, i interface{}) *http.Request

NewXSRFJWTAuthentifiedRequest prepare a request

func SetUserGroupAdmin

func SetUserGroupAdmin(t *testing.T, db gorpmapper.SqlExecutorWithTx, groupID int64, userID string)

SetUserGroupAdmin allows a user to perform operations on given group

Types

This section is empty.

Jump to

Keyboard shortcuts

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