server

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BuildResp represents a JSON return for a single build.
	BuildResp = `` /* 830-byte string literal not displayed */

	// BuildsResp represents a JSON return for one to many builds.
	BuildsResp = `` /* 1747-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 */

)
View Source
const (
	// DeploymentResp represents a JSON return for a single build.
	DeploymentResp = `` /* 295-byte string literal not displayed */

	// DeploymentsResp represents a JSON return for one to many builds.
	DeploymentsResp = `` /* 640-byte string literal not displayed */

)
View Source
const (
	// HookResp represents a JSON return for a single hook.
	HookResp = `` /* 308-byte string literal not displayed */

	// HooksResp represents a JSON return for one to many hooks.
	HooksResp = `` /* 678-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 YAML return for a single pipeline.
	PipelineResp = `` /* 466-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 = `` /* 409-byte string literal not displayed */

	// ReposResp represents a JSON return for one to many repos.
	ReposResp = `` /* 908-byte string literal not displayed */

)
View Source
const (
	// SecretResp represents a JSON return for a single secret.
	SecretResp = `` /* 179-byte string literal not displayed */

	// SecretsResp represents a JSON return for one to many secrets.
	SecretsResp = `` /* 634-byte string literal not displayed */

)

nolint:gosec // these are mock responses

View Source
const (
	// ServiceResp represents a JSON return for a single service.
	ServiceResp = `` /* 212-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 = `` /* 274-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 = `` /* 197-byte string literal not displayed */

	// WorkersResp represents a JSON return for one to many workers.
	WorkersResp = `` /* 415-byte string literal not displayed */

)
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

func FakeHandler() http.Handler

FakeHandler returns an http.Handler that is capable of handling Vela API requests and returning mock responses. nolint:funlen // number of endpoints is causing linter warning

Types

This section is empty.

Jump to

Keyboard shortcuts

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