Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

wsbuilder

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:16Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a newworkspace build into the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeBuildError

type BuildError struct {// Status is a suitable HTTP status codeStatusintMessagestringWrappederror}

func (BuildError)Error

func (eBuildError) Error()string

func (BuildError)Unwrap

func (eBuildError) Unwrap()error

typeBuilder

type Builder struct {// contains filtered or unexported fields}

Builder encapsulates the business logic of inserting a new workspace build into the database.

Builder follows the so-called "Builder" pattern where options that customize the kind of build you get returna new instance of the Builder with the option applied.

Example:

b = wsbuilder.New(workspace, transition).VersionID(vID).Initiator(me)build, job, err := b.Build(...)

func (Builder)ActiveVersion

func (bBuilder) ActiveVersion()Builder

func (*Builder)Build

func (b *Builder) Build(ctxcontext.Context,storedatabase.Store,authFunc func(actionrbac.Action, objectrbac.Objecter)bool,) (*database.WorkspaceBuild, *database.ProvisionerJob,error,)

Build computes and inserts a new workspace build into the database. If authFunc is provided, it also performsauthorization preflight checks.

func (Builder)DeploymentValuesadded inv0.25.0

func (bBuilder) DeploymentValues(dv *codersdk.DeploymentValues)Builder

func (Builder)Initiator

func (bBuilder) Initiator(uuuid.UUID)Builder

func (Builder)LogLevel

func (bBuilder) LogLevel(lstring)Builder

func (Builder)Orphan

func (bBuilder) Orphan()Builder

func (Builder)Reason

func (Builder)RichParameterValues

func (bBuilder) RichParameterValues(p []codersdk.WorkspaceBuildParameter)Builder

func (Builder)SetLastWorkspaceBuildInTx

func (bBuilder) SetLastWorkspaceBuildInTx(build *database.WorkspaceBuild)Builder

SetLastWorkspaceBuildInTx prepopulates the Builder's cache with the last workspace build. This allows usto avoid a repeated database query when the Builder's caller also needs the workspace build, e.g. auto-start &auto-stop.

CAUTION: only call this method from within a database transaction with RepeatableRead isolation. This transactionMUST be the database.Store you call Build() with.

func (Builder)SetLastWorkspaceBuildJobInTx

func (bBuilder) SetLastWorkspaceBuildJobInTx(job *database.ProvisionerJob)Builder

SetLastWorkspaceBuildJobInTx prepopulates the Builder's cache with the last workspace build job. This allows usto avoid a repeated database query when the Builder's caller also needs the workspace build job, e.g. auto-start &auto-stop.

CAUTION: only call this method from within a database transaction with RepeatableRead isolation. This transactionMUST be the database.Store you call Build() with.

func (Builder)State

func (bBuilder) State(state []byte)Builder

func (Builder)VersionID

func (bBuilder) VersionID(vuuid.UUID)Builder

typeOption

type Option func(Builder)Builder

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp