singleprocess

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUser is the username of the initial user created during bootstrapping. This
	// also is the user that Waypoint server versions prior to 0.5 used with
	// their token, so we use this to detect that scenario as well.
	DefaultUser = serverstate.DefaultUser

	// DefaultUserId is the ID of the initial user created during bootstrapping.
	DefaultUserId = serverstate.DefaultUserId

	// DefaultKeyId is the identifier for the default key to use to generating tokens.
	DefaultKeyId = "k1"
)

Variables

View Source
var (
	ErrInvalidToken = errors.New("invalid authentication token")
)

Functions

func CookieFromRequest

func CookieFromRequest(ctx context.Context) string

CookieFromRequest returns the server cookie value provided during the request, or blank if none (or a blank cookie) is provided.

func DecodedTokenWithContext added in v0.10.0

func DecodedTokenWithContext(ctx context.Context, t *pb.Token) context.Context

DecodedTokenWithContext inserts the decrypted token t into the context.

func New

func New(opts ...Option) (pb.WaypointServer, error)

New returns a Waypoint server implementation that uses BotlDB plus in-memory locks to operate safely.

func TestApp

func TestApp(t testing.T, client pb.WaypointClient, ref *pb.Ref_Application)

TestApp creates the app in the DB.

func TestEntrypoint

func TestEntrypoint(t testing.T, client pb.WaypointClient) (string, string, func())

func TestEntrypointPlugin

func TestEntrypointPlugin(t testing.T, client pb.WaypointClient) (string, string, func())

func TestImpl

func TestImpl(t testing.T, opts ...Option) pb.WaypointServer

TestImpl returns the waypoint server implementation. This can be used with server.TestServer. It is easier to just use TestServer directly.

func TestRunnerAdopted

func TestRunnerAdopted(
	t testing.T,
	impl pb.WaypointServer,
	client pb.WaypointClient,
	r *pb.Runner,
) (string, pb.WaypointClient)

TestRunnerAdopted registers a runner using the adoption process and returns a client that uses the token for this specific runner. This uses t.Cleanup so the runner will be cleaned up on completion.

func TestServer

func TestServer(t testing.T, opts ...Option) pb.WaypointClient

TestServer starts a singleprocess server and returns the connected client. We use t.Cleanup to ensure resources are automatically cleaned up.

func UserWithContext

func UserWithContext(ctx context.Context, u *pb.User) context.Context

UserWithContext inserts the user value u into the context. This can be extracted with UserFromContext.

Types

type Option

type Option func(*Service, *config) error

func TestWithURLService

func TestWithURLService(t testing.T, out *hzntest.DevSetup) Option

TestWithURLService is an Option for testing only that creates an in-memory URL service server. This requires access to an external postgres server.

If out is non-nil, it will be written to with the DevSetup info.

func TestWithURLServiceGuestAccount

func TestWithURLServiceGuestAccount(t testing.T) Option

TestWithURLServiceGuestAccount sets the API token to empty to force getting a guest account with the URL service. This can ONLY be set if TestWithURLService is set before this.

func WithAcceptURLTerms

func WithAcceptURLTerms(accept bool) Option

WithAcceptURLTerms will set the config to either accept or reject the terms of service for using the URL service. Rejecting the TOS will disable the URL service. Note that the actual rejection does not occur until the waypoint horizon client attempts to register its guest account.

func WithActiveAuthKeyId added in v0.10.0

func WithActiveAuthKeyId(id string) Option

WithActiveAuthKeyId sets an identifier representing the key that will be used for authentication (i.e. generating protobuf token signatures) This server will also be expected to be able to work with auth data generated by a server bearing this key id. EXAMPLE: the boltdb state engine currently uses this as an ID for the HMAC key that it generates. If the AuthKeyId changes, the boltdb state will generate a new corresponding HMAC key, and subsequently use that to generate new token signatures.

func WithConfig

func WithConfig(scfg *serverconfig.Config) Option

WithConfig sets the server config in use with this server.

func WithDB

func WithDB(db *bolt.DB) Option

WithDB return a server option with a boltdb state provider

func WithFeatures added in v0.10.0

func WithFeatures(features ...pb.ServerFeaturesFeature) Option

WithFeatures adds features that the server will advertise on the GetVersionInfo rpc, that clients can use to ensure compatibility before attempting to exercise features.

func WithIdDecoder

func WithIdDecoder(decoder func(encodedId string) (id string, err error)) Option

WithIdDecoder provides the server with an optional function that takes a string that contains an ID (likely created with EncodeId), and returns only the waypoint-relevant ID.

func WithIdEncoder

func WithIdEncoder(encoder func(ctx context.Context, id string) (encodedId string, err error)) Option

WithIdEncoder provides the server with an optional function that takes a waypoint ID (user id, runner id, etc.), uses the provided context to encode additional metadata (if present), and returns an ID that can be decoded by DecodeId.

func WithLogStreamProvider

func WithLogStreamProvider(logStreamProvider logstream.Provider) Option

WithLogStreamProvider gives the server a custom log stream provider, which is invoked to transport logs from waypoint runners to any listening clients and to persist them.

func WithLogger

func WithLogger(log hclog.Logger) Option

WithLogger sets the logger for use with the server.

func WithOidcDisabled

func WithOidcDisabled(disabled bool) Option

WithOidcDisabled disables all OIDC related background jobs

func WithPollingDisabled

func WithPollingDisabled(disabled bool) Option

WithPollingDisabled disables polling background jobs

func WithPopulateJobDataSource added in v0.10.0

func WithPopulateJobDataSource(fn func(context.Context, *pb.Job) (*pb.Job, error)) Option

func WithServerConfigSkipInit

func WithServerConfigSkipInit() Option

WithServerConfigSkipInit skips initial server config initialization which may be desired if server config is initialized some other way. If unset, server config will be initialized on startup.

func WithServerId

func WithServerId(serverId string) Option

WithServerId starts this server with a given id, rather than a randomly generated id.

func WithState

func WithState(state serverstate.Interface) Option

WithState sets the server to use the given state package

func WithStateProvider

func WithStateProvider(stateProvider func(ctx context.Context) serverstate.Interface) Option

WithStateProvider sets the server to use the state provided by the given function

func WithSuperuser

func WithSuperuser() Option

WithSuperuser forces all API actions to behave as if a superuser made them. This is usually turned on for local mode only. There is no option (at the time of writing) to enable this on a network-attached server.

func WithTokenProcessor added in v0.10.0

func WithTokenProcessor(fn func(context.Context, *pb.TokenTransport, *pb.Token) (*pb.Token, error)) Option

WithTokenProcessor installs a function that will be called just before a new token is encoded. This allows customization of that Token to include additional information.

type Service

type Service struct {
	pb.UnimplementedWaypointServer
	// contains filtered or unexported fields
}

Service implements the gRPC service for the server.

func (*Service) AdoptRunner

func (s *Service) AdoptRunner(
	ctx context.Context,
	req *pb.AdoptRunnerRequest,
) (*empty.Empty, error)

func (*Service) Authenticate

func (s *Service) Authenticate(
	ctx context.Context, token, endpoint string, effects []string,
) (context.Context, error)

Authenticate implements the server.AuthChecker interface.

This checks if the given endpoint should be allowed. This is called during a gRPC request. Effects is some information about the endpoint, at present these are either ["readonly"] or ["mutable"] to indicate if the endpoint will be only reading data or also mutating it.

func (*Service) BootstrapToken

func (s *Service) BootstrapToken(ctx context.Context, req *empty.Empty) (*pb.NewTokenResponse, error)

BootstrapToken RPC call.

func (*Service) Bootstrapped

func (s *Service) Bootstrapped(ctx context.Context) bool

Bootstrapped returns true if the server is already bootstrapped. If this returns true then BootstrapToken can no longer be called.

func (*Service) CancelJob

func (s *Service) CancelJob(
	ctx context.Context,
	req *pb.CancelJobRequest,
) (*empty.Empty, error)

func (*Service) CancelTask added in v0.9.0

func (s *Service) CancelTask(
	ctx context.Context,
	req *pb.CancelTaskRequest,
) (*empty.Empty, error)

func (*Service) Close

func (s *Service) Close() error

Close shuts down any background processes and resources that may be used by the service. This should be called after the service is no longer responding to requests.

func (*Service) CompleteOIDCAuth

func (s *Service) CompleteOIDCAuth(
	ctx context.Context,
	req *pb.CompleteOIDCAuthRequest,
) (*pb.CompleteOIDCAuthResponse, error)

func (*Service) ConvertInviteToken

func (s *Service) ConvertInviteToken(ctx context.Context, req *pb.ConvertInviteTokenRequest) (*pb.NewTokenResponse, error)

Given an invite token, validate it and return a login token. This is a gRPC wrapper around ExchangeInvite.

func (*Service) CreateHostname

func (s *Service) CreateHostname(
	ctx context.Context,
	req *pb.CreateHostnameRequest,
) (*pb.CreateHostnameResponse, error)

func (*Service) CreateSnapshot

func (s *Service) CreateSnapshot(
	req *empty.Empty,
	srv pb.Waypoint_CreateSnapshotServer,
) error

func (*Service) DecodeToken

func (s *Service) DecodeToken(
	ctx context.Context, req *pb.DecodeTokenRequest,
) (*pb.DecodeTokenResponse, error)

DecodeToken RPC call.

func (*Service) DeleteAuthMethod

func (s *Service) DeleteAuthMethod(
	ctx context.Context,
	req *pb.DeleteAuthMethodRequest,
) (*empty.Empty, error)

func (*Service) DeleteConfig added in v0.11.2

func (s *Service) DeleteConfig(
	ctx context.Context,
	req *pb.ConfigDeleteRequest,
) (*pb.ConfigDeleteResponse, error)

func (*Service) DeleteConfigSource added in v0.11.2

func (s *Service) DeleteConfigSource(
	ctx context.Context,
	req *pb.DeleteConfigSourceRequest,
) (*empty.Empty, error)

func (*Service) DeleteHostname

func (s *Service) DeleteHostname(
	ctx context.Context,
	req *pb.DeleteHostnameRequest,
) (*empty.Empty, error)

func (*Service) DeleteOnDemandRunnerConfig added in v0.9.0

func (*Service) DeleteTrigger

func (s *Service) DeleteTrigger(
	ctx context.Context,
	req *pb.DeleteTriggerRequest,
) (*empty.Empty, error)

DeleteTrigger deletes a Trigger based on ID

func (*Service) DeleteUser

func (s *Service) DeleteUser(
	ctx context.Context,
	req *pb.DeleteUserRequest,
) (*empty.Empty, error)

func (*Service) DestroyProject added in v0.10.0

func (s *Service) DestroyProject(
	ctx context.Context,
	req *pb.DestroyProjectRequest,
) (*empty.Empty, error)

func (*Service) EntrypointConfig

func (s *Service) EntrypointConfig(
	req *pb.EntrypointConfigRequest,
	srv pb.Waypoint_EntrypointConfigServer,
) error

TODO: test

func (*Service) EntrypointExecStream

func (s *Service) EntrypointExecStream(
	server pb.Waypoint_EntrypointExecStreamServer,
) error

func (*Service) EntrypointLogStream

func (s *Service) EntrypointLogStream(
	server pb.Waypoint_EntrypointLogStreamServer,
) error

TODO: test

func (*Service) ExpediteStatusReport

func (s *Service) ExpediteStatusReport(
	ctx context.Context,
	req *pb.ExpediteStatusReportRequest,
) (*pb.ExpediteStatusReportResponse, error)

Builds a status report job, queues it, and returns the job ID

func (*Service) ForgetRunner

func (s *Service) ForgetRunner(
	ctx context.Context,
	req *pb.ForgetRunnerRequest,
) (*empty.Empty, error)

func (*Service) GenerateInviteToken

func (s *Service) GenerateInviteToken(
	ctx context.Context, req *pb.InviteTokenRequest,
) (*pb.NewTokenResponse, error)

Create a new invite token.

func (*Service) GenerateLoginToken

func (s *Service) GenerateLoginToken(
	ctx context.Context, req *pb.LoginTokenRequest,
) (*pb.NewTokenResponse, error)

Create a new login token. This is just a gRPC wrapper around newToken.

func (*Service) GenerateRunnerToken

func (s *Service) GenerateRunnerToken(
	ctx context.Context, req *pb.GenerateRunnerTokenRequest,
) (*pb.NewTokenResponse, error)

Create a new runner token.

func (*Service) GetApplication

func (s *Service) GetApplication(
	ctx context.Context,
	req *pb.GetApplicationRequest,
) (*pb.GetApplicationResponse, error)

func (*Service) GetAuthMethod

func (s *Service) GetAuthMethod(
	ctx context.Context,
	req *pb.GetAuthMethodRequest,
) (*pb.GetAuthMethodResponse, error)

func (*Service) GetBuild

func (s *Service) GetBuild(
	ctx context.Context,
	req *pb.GetBuildRequest,
) (*pb.Build, error)

GetBuild returns a Build based on ID

func (*Service) GetConfig

func (s *Service) GetConfig(
	ctx context.Context,
	req *pb.ConfigGetRequest,
) (*pb.ConfigGetResponse, error)

func (*Service) GetConfigSource

func (s *Service) GetConfigSource(
	ctx context.Context,
	req *pb.GetConfigSourceRequest,
) (*pb.GetConfigSourceResponse, error)

func (*Service) GetDefaultOnDemandRunnerConfig added in v0.10.3

func (s *Service) GetDefaultOnDemandRunnerConfig(
	ctx context.Context,
	req *empty.Empty,
) (*pb.GetOnDemandRunnerConfigResponse, error)

func (*Service) GetDeployment

func (s *Service) GetDeployment(
	ctx context.Context,
	req *pb.GetDeploymentRequest,
) (*pb.Deployment, error)

GetDeployment returns a Deployment based on ID

func (*Service) GetJob

func (s *Service) GetJob(
	ctx context.Context,
	req *pb.GetJobRequest,
) (*pb.Job, error)

func (*Service) GetJobStream

func (s *Service) GetJobStream(
	req *pb.GetJobStreamRequest,
	server pb.Waypoint_GetJobStreamServer,
) error

func (*Service) GetLatestBuild

func (s *Service) GetLatestBuild(
	ctx context.Context,
	req *pb.GetLatestBuildRequest,
) (*pb.Build, error)

func (*Service) GetLatestPipelineRun added in v0.10.3

func (s *Service) GetLatestPipelineRun(
	ctx context.Context,
	req *pb.GetPipelineRequest,
) (*pb.GetPipelineRunResponse, error)

func (*Service) GetLatestPushedArtifact

func (s *Service) GetLatestPushedArtifact(
	ctx context.Context,
	req *pb.GetLatestPushedArtifactRequest,
) (*pb.PushedArtifact, error)

TODO: test

func (*Service) GetLatestRelease

func (s *Service) GetLatestRelease(
	ctx context.Context,
	req *pb.GetLatestReleaseRequest,
) (*pb.Release, error)

TODO: test

func (*Service) GetLatestStatusReport

func (s *Service) GetLatestStatusReport(
	ctx context.Context,
	req *pb.GetLatestStatusReportRequest,
) (*pb.StatusReport, error)

func (*Service) GetLogStream

func (s *Service) GetLogStream(
	req *pb.GetLogStreamRequest,
	srv pb.Waypoint_GetLogStreamServer,
) error

func (*Service) GetOIDCAuthURL

func (s *Service) GetOIDCAuthURL(
	ctx context.Context,
	req *pb.GetOIDCAuthURLRequest,
) (*pb.GetOIDCAuthURLResponse, error)

func (*Service) GetOnDemandRunnerConfig

func (s *Service) GetOnDemandRunnerConfig(
	ctx context.Context,
	req *pb.GetOnDemandRunnerConfigRequest,
) (*pb.GetOnDemandRunnerConfigResponse, error)

func (*Service) GetPipeline added in v0.10.0

func (s *Service) GetPipeline(
	ctx context.Context,
	req *pb.GetPipelineRequest,
) (*pb.GetPipelineResponse, error)

GetPipeline returns a Pipeline based on a pipeline ref id

func (*Service) GetPipelineRun added in v0.10.0

func (s *Service) GetPipelineRun(
	ctx context.Context,
	req *pb.GetPipelineRunRequest,
) (*pb.GetPipelineRunResponse, error)

func (*Service) GetProject

func (s *Service) GetProject(
	ctx context.Context,
	req *pb.GetProjectRequest,
) (*pb.GetProjectResponse, error)

func (*Service) GetPushedArtifact

func (s *Service) GetPushedArtifact(
	ctx context.Context,
	req *pb.GetPushedArtifactRequest,
) (*pb.PushedArtifact, error)

GetPushedArtifact returns a PushedArtifact based on ID

func (*Service) GetRelease

func (s *Service) GetRelease(
	ctx context.Context,
	req *pb.GetReleaseRequest,
) (*pb.Release, error)

GetRelease returns a Release based on ID

func (*Service) GetRunner

func (s *Service) GetRunner(
	ctx context.Context,
	req *pb.GetRunnerRequest,
) (*pb.Runner, error)

TODO: test

func (*Service) GetServerConfig

func (s *Service) GetServerConfig(
	ctx context.Context,
	req *empty.Empty,
) (*pb.GetServerConfigResponse, error)

func (*Service) GetStatusReport

func (s *Service) GetStatusReport(
	ctx context.Context,
	req *pb.GetStatusReportRequest,
) (*pb.StatusReport, error)

GetStatusReport returns a StatusReport based on ID

func (*Service) GetTask added in v0.9.0

func (s *Service) GetTask(
	ctx context.Context,
	req *pb.GetTaskRequest,
) (*pb.GetTaskResponse, error)

GetTask returns a Task based on ID

func (*Service) GetTrigger

func (s *Service) GetTrigger(
	ctx context.Context,
	req *pb.GetTriggerRequest,
) (*pb.GetTriggerResponse, error)

GetTrigger returns a Trigger based on ID

func (*Service) GetUser

func (s *Service) GetUser(
	ctx context.Context,
	req *pb.GetUserRequest,
) (*pb.GetUserResponse, error)

func (*Service) GetVersionInfo

func (s *Service) GetVersionInfo(
	ctx context.Context,
	req *empty.Empty,
) (*pb.GetVersionInfoResponse, error)

func (*Service) GetWorkspace

func (s *Service) GetWorkspace(
	ctx context.Context,
	req *pb.GetWorkspaceRequest,
) (*pb.GetWorkspaceResponse, error)

TODO: test

func (*Service) ListAuthMethods

func (s *Service) ListAuthMethods(
	ctx context.Context,
	req *empty.Empty,
) (*pb.ListAuthMethodsResponse, error)

func (*Service) ListBuilds

func (s *Service) ListBuilds(
	ctx context.Context,
	req *pb.ListBuildsRequest,
) (*pb.ListBuildsResponse, error)

func (*Service) ListDeployments

func (s *Service) ListDeployments(
	ctx context.Context,
	req *pb.ListDeploymentsRequest,
) (*pb.ListDeploymentsResponse, error)

func (*Service) ListHostnames

func (s *Service) ListHostnames(
	ctx context.Context,
	req *pb.ListHostnamesRequest,
) (*pb.ListHostnamesResponse, error)

func (*Service) ListInstances

func (s *Service) ListInstances(
	ctx context.Context,
	req *pb.ListInstancesRequest,
) (*pb.ListInstancesResponse, error)

func (*Service) ListJobs

func (s *Service) ListJobs(
	ctx context.Context,
	req *pb.ListJobsRequest,
) (*pb.ListJobsResponse, error)

func (*Service) ListOIDCAuthMethods

func (s *Service) ListOIDCAuthMethods(
	ctx context.Context,
	req *empty.Empty,
) (*pb.ListOIDCAuthMethodsResponse, error)

func (*Service) ListOnDemandRunnerConfigs

func (s *Service) ListOnDemandRunnerConfigs(
	ctx context.Context,
	req *empty.Empty,
) (*pb.ListOnDemandRunnerConfigsResponse, error)

func (*Service) ListPipelineRuns added in v0.10.0

func (s *Service) ListPipelineRuns(
	ctx context.Context,
	req *pb.ListPipelineRunsRequest,
) (*pb.ListPipelineRunsResponse, error)

func (*Service) ListPipelines added in v0.10.0

func (s *Service) ListPipelines(
	ctx context.Context,
	req *pb.ListPipelinesRequest,
) (*pb.ListPipelinesResponse, error)

func (*Service) ListProjects

func (s *Service) ListProjects(
	ctx context.Context,
	req *pb.ListProjectsRequest,
) (*pb.ListProjectsResponse, error)

func (*Service) ListPushedArtifacts

func (s *Service) ListPushedArtifacts(
	ctx context.Context,
	req *pb.ListPushedArtifactsRequest,
) (*pb.ListPushedArtifactsResponse, error)

func (*Service) ListReleases

func (s *Service) ListReleases(
	ctx context.Context,
	req *pb.ListReleasesRequest,
) (*pb.ListReleasesResponse, error)

TODO: test

func (*Service) ListRunners

func (s *Service) ListRunners(
	ctx context.Context,
	req *pb.ListRunnersRequest,
) (*pb.ListRunnersResponse, error)

func (*Service) ListStatusReports

func (s *Service) ListStatusReports(
	ctx context.Context,
	req *pb.ListStatusReportsRequest,
) (*pb.ListStatusReportsResponse, error)

func (*Service) ListTask added in v0.9.0

func (s *Service) ListTask(
	ctx context.Context,
	req *pb.ListTaskRequest,
) (*pb.ListTaskResponse, error)

func (*Service) ListTriggers

func (s *Service) ListTriggers(
	ctx context.Context,
	req *pb.ListTriggerRequest,
) (*pb.ListTriggerResponse, error)

func (*Service) ListUsers

func (s *Service) ListUsers(
	ctx context.Context,
	req *empty.Empty,
) (*pb.ListUsersResponse, error)

func (*Service) ListWorkspaces

func (s *Service) ListWorkspaces(
	ctx context.Context,
	req *pb.ListWorkspacesRequest,
) (*pb.ListWorkspacesResponse, error)

TODO: test

func (*Service) NoAuthRunTrigger

func (s *Service) NoAuthRunTrigger(
	ctx context.Context,
	req *pb.RunTriggerRequest,
) (*pb.RunTriggerResponse, error)

NoAuthRunTrigger is defined in our auth.go package to not need a token for incoming requests. Eventually, Waypoint should have a middleware func for incoming requests that can handle API endpoints that can support authenticated and non-authenticated requests like this one. https://github.com/hashicorp/waypoint/issues/2990

func (*Service) QueueJob

func (s *Service) QueueJob(
	ctx context.Context,
	req *pb.QueueJobRequest,
) (*pb.QueueJobResponse, error)

func (*Service) RestoreSnapshot

func (s *Service) RestoreSnapshot(
	srv pb.Waypoint_RestoreSnapshotServer,
) error

func (*Service) RunPipeline added in v0.10.0

func (s *Service) RunPipeline(
	ctx context.Context,
	req *pb.RunPipelineRequest,
) (*pb.RunPipelineResponse, error)

func (*Service) RunTrigger

func (s *Service) RunTrigger(
	ctx context.Context,
	req *pb.RunTriggerRequest,
) (*pb.RunTriggerResponse, error)

RunTrigger takes a configured trigger URL, and crafts all of the appropriate data into a QueuedJobRequest for Waypoint to execute. It returns a list of job ids that have been queued from the result of the request.

func (*Service) RunnerConfig

func (s *Service) RunnerConfig(
	srv pb.Waypoint_RunnerConfigServer,
) error

func (*Service) RunnerJobStream

func (s *Service) RunnerJobStream(
	server pb.Waypoint_RunnerJobStreamServer,
) error

func (*Service) RunnerToken

func (s *Service) RunnerToken(
	ctx context.Context,
	req *pb.RunnerTokenRequest,
) (*pb.RunnerTokenResponse, error)

func (*Service) SetConfig

func (s *Service) SetConfig(
	ctx context.Context,
	req *pb.ConfigSetRequest,
) (*pb.ConfigSetResponse, error)

func (*Service) SetConfigSource

func (s *Service) SetConfigSource(
	ctx context.Context,
	req *pb.SetConfigSourceRequest,
) (*empty.Empty, error)

func (*Service) SetServerConfig

func (s *Service) SetServerConfig(
	ctx context.Context,
	req *pb.SetServerConfigRequest,
) (*empty.Empty, error)

func (*Service) StartExecStream

func (s *Service) StartExecStream(
	srv pb.Waypoint_StartExecStreamServer,
) error

func (*Service) UI_GetDeployment added in v0.11.0

func (s *Service) UI_GetDeployment(
	ctx context.Context,
	req *pb.UI_GetDeploymentRequest,
) (*pb.UI_GetDeploymentResponse, error)

func (*Service) UI_GetProject

func (s *Service) UI_GetProject(
	ctx context.Context,
	req *pb.UI_GetProjectRequest,
) (*pb.UI_GetProjectResponse, error)

func (*Service) UI_ListDeployments

func (s *Service) UI_ListDeployments(
	ctx context.Context,
	req *pb.UI_ListDeploymentsRequest,
) (*pb.UI_ListDeploymentsResponse, error)

func (*Service) UI_ListProjects added in v0.11.0

func (s *Service) UI_ListProjects(
	ctx context.Context,
	req *pb.UI_ListProjectsRequest,
) (*pb.UI_ListProjectsResponse, error)

func (*Service) UI_ListReleases

func (s *Service) UI_ListReleases(
	ctx context.Context,
	req *pb.UI_ListReleasesRequest,
) (*pb.UI_ListReleasesResponse, error)

func (*Service) UpdateUser

func (s *Service) UpdateUser(
	ctx context.Context,
	req *pb.UpdateUserRequest,
) (*pb.UpdateUserResponse, error)

func (*Service) UpsertApplication

func (s *Service) UpsertApplication(
	ctx context.Context,
	req *pb.UpsertApplicationRequest,
) (*pb.UpsertApplicationResponse, error)

func (*Service) UpsertAuthMethod

func (s *Service) UpsertAuthMethod(
	ctx context.Context,
	req *pb.UpsertAuthMethodRequest,
) (*pb.UpsertAuthMethodResponse, error)

func (*Service) UpsertBuild

func (s *Service) UpsertBuild(
	ctx context.Context,
	req *pb.UpsertBuildRequest,
) (*pb.UpsertBuildResponse, error)

func (*Service) UpsertDeployment

func (s *Service) UpsertDeployment(
	ctx context.Context,
	req *pb.UpsertDeploymentRequest,
) (*pb.UpsertDeploymentResponse, error)

func (*Service) UpsertPipeline added in v0.10.0

func (s *Service) UpsertPipeline(
	ctx context.Context,
	req *pb.UpsertPipelineRequest,
) (*pb.UpsertPipelineResponse, error)

func (*Service) UpsertProject

func (s *Service) UpsertProject(
	ctx context.Context,
	req *pb.UpsertProjectRequest,
) (*pb.UpsertProjectResponse, error)

func (*Service) UpsertPushedArtifact

func (s *Service) UpsertPushedArtifact(
	ctx context.Context,
	req *pb.UpsertPushedArtifactRequest,
) (*pb.UpsertPushedArtifactResponse, error)

func (*Service) UpsertRelease

func (s *Service) UpsertRelease(
	ctx context.Context,
	req *pb.UpsertReleaseRequest,
) (*pb.UpsertReleaseResponse, error)

func (*Service) UpsertStatusReport

func (s *Service) UpsertStatusReport(
	ctx context.Context,
	req *pb.UpsertStatusReportRequest,
) (*pb.UpsertStatusReportResponse, error)

func (*Service) UpsertTask added in v0.9.0

func (s *Service) UpsertTask(
	ctx context.Context,
	req *pb.UpsertTaskRequest,
) (*pb.UpsertTaskResponse, error)

func (*Service) UpsertTrigger

func (s *Service) UpsertTrigger(
	ctx context.Context,
	req *pb.UpsertTriggerRequest,
) (*pb.UpsertTriggerResponse, error)

func (*Service) UpsertWorkspace

func (s *Service) UpsertWorkspace(
	ctx context.Context,
	req *pb.UpsertWorkspaceRequest,
) (*pb.UpsertWorkspaceResponse, error)

func (*Service) UserFromContext added in v0.11.0

func (s *Service) UserFromContext(ctx context.Context) *pb.User

UserFromContext returns the authenticated user in the request context. This will return nil if the user is not authenticated. Note that a user may not be authenticated but the request can still be authenticated using a non-user token type. The safest way to check is decodedTokenFromContext.

func (*Service) ValidateJob

func (s *Service) ValidateJob(
	ctx context.Context,
	req *pb.ValidateJobRequest,
) (*pb.ValidateJobResponse, error)

func (*Service) WaypointHclFmt

func (s *Service) WaypointHclFmt(
	ctx context.Context,
	req *pb.WaypointHclFmtRequest,
) (*pb.WaypointHclFmtResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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