Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BuildResp represents a JSON return for a single build. BuildResp = `` /* 973-byte string literal not displayed */ // BuildsResp represents a JSON return for one to many builds. BuildsResp = `` /* 1739-byte string literal not displayed */ // BuildLogsResp represents a JSON return for build logs. BuildLogsResp = `` /* 226-byte string literal not displayed */ // BuildQueueResp represents a JSON return for build queue. BuildQueueResp = `` /* 226-byte string literal not displayed */ // BuildTokenResp represents a JSON return for requesting a build token // //nolint:gosec // not actual credentials BuildTokenResp = `` /* 188-byte string literal not displayed */ // BuildExecutableResp represents a JSON return for requesting a build executable. BuildExecutableResp = `` /* 539-byte string literal not displayed */ // CleanResourcesResp represents a string return for cleaning resources as an admin. CleanResourcesResp = "42 builds cleaned. 42 services cleaned. 42 steps cleaned." )
View Source
const ( // DeploymentResp represents a JSON return for a single build. DeploymentResp = `` /* 369-byte string literal not displayed */ // DeploymentsResp represents a JSON return for one to many builds. DeploymentsResp = `` /* 636-byte string literal not displayed */ )
View Source
const ( // HookResp represents a JSON return for a single hook. HookResp = `` /* 350-byte string literal not displayed */ // HooksResp represents a JSON return for one to many hooks. HooksResp = `` /* 674-byte string literal not displayed */ )
View Source
const ( // CompileResp represents a YAML return for an compiled pipeline. CompileResp = `` /* 691-byte string literal not displayed */ // ExpandResp represents a YAML return for an expanded pipeline. ExpandResp = `` /* 691-byte string literal not displayed */ // PipelineResp represents a JSON return for a single pipeline. PipelineResp = `` /* 454-byte string literal not displayed */ // PipelinesResp represents a JSON return for one to many hooks. PipelinesResp = `` /* 981-byte string literal not displayed */ // TemplateResp represents a YAML return for templates in a pipeline. TemplateResp = `--- sample: name: sample source: github.com/go-vela/vela-tutorials/templates/sample.yml type: github ` )
View Source
const ( // RepoResp represents a JSON return for a single repo. RepoResp = `` /* 841-byte string literal not displayed */ // ReposResp represents a JSON return for one to many repos. ReposResp = `` /* 950-byte string literal not displayed */ )
View Source
const ( // ScheduleResp represents a JSON return for a single schedule. ScheduleResp = `` /* 226-byte string literal not displayed */ SchedulesResp = `` /* 483-byte string literal not displayed */ )
View Source
const ( // SecretResp represents a JSON return for a single secret. SecretResp = `` /* 616-byte string literal not displayed */ // SecretsResp represents a JSON return for one to many secrets. SecretsResp = `` /* 634-byte string literal not displayed */ )
View Source
const ( // ServiceResp represents a JSON return for a single service. ServiceResp = `` /* 300-byte string literal not displayed */ // ServicesResp represents a JSON return for one to many services. ServicesResp = `` /* 482-byte string literal not displayed */ )
View Source
const ( // StepResp represents a JSON return for a single step. StepResp = `` /* 310-byte string literal not displayed */ // StepsResp represents a JSON return for one to many steps. StepsResp = `` /* 618-byte string literal not displayed */ )
View Source
const ( // UserResp represents a JSON return for a single user. UserResp = `{ "id": 1, "name": "OctoKitty", "token": null, "favorites": ["github/octocat"], "active": true, "admin": false }` // UsersResp represents a JSON return for one to many users. UsersResp = `` /* 284-byte string literal not displayed */ )
View Source
const ( // WorkerResp represents a JSON return for a single worker. WorkerResp = `` /* 369-byte string literal not displayed */ // WorkersResp represents a JSON return for one to many workers. WorkersResp = `` /* 415-byte string literal not displayed */ // AddWorkerResp represents a JSON return for adding a worker. AddWorkerResp = `` /* 184-byte string literal not displayed */ // RefreshWorkerAuthResp represents a JSON return for refreshing a worker's authentication. RefreshWorkerAuthResp = `` /* 178-byte string literal not displayed */ // RegisterTokenResp represents a JSON return for an admin requesting a registration token. // //nolint:gosec // not actual credentials RegisterTokenResp = `` /* 183-byte string literal not displayed */ // QueueInfoResp represents a JSON return for an admin requesting a queue registration info. // //not actual credentials. QueueInfoResp = `{ "queue_public_key": "DXeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ98zmko=", "queue_address": "redis://redis:6000" }` )
View Source
const (
// LogResp represents a JSON return for a single log.
LogResp = `{
"id": 1,
"build_id": 1,
"repo_id": 1,
"service_id": 1,
"step_id": 1,
"data": "SGVsbG8sIFdvcmxkIQ=="
}`
)
View Source
const ( // TokenRefreshResp represents a JSON return for a token refresh. //nolint:gosec // not a hardcoded credential TokenRefreshResp = `{ "token": "header.payload.signature" }` )
Variables ¶
This section is empty.
Functions ¶
func FakeHandler ¶
FakeHandler returns an http.Handler that is capable of handling Vela API requests and returning mock responses.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.