grpc

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIServiceServer

func NewAPIServiceServer(
	svc *usecase.APIServerService,
	pubKey *ssh.PublicKeys,
	avatarBaseURL domain.AvatarBaseURL,
) pbconnect.APIServiceHandler

func NewControllerBuilderService

func NewControllerBuilderService(
	logStream *usecase.LogStreamService,
) domain.ControllerBuilderService

func NewControllerSSGenService

func NewControllerSSGenService() domain.ControllerSSGenService

Types

type APIService

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

func (*APIService) CancelBuild

func (s *APIService) CancelBuild(ctx context.Context, req *connect.Request[pb.BuildIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) CreateApplication

func (s *APIService) CreateApplication(ctx context.Context, req *connect.Request[pb.CreateApplicationRequest]) (*connect.Response[pb.Application], error)

func (*APIService) CreateRepository

func (s *APIService) CreateRepository(ctx context.Context, req *connect.Request[pb.CreateRepositoryRequest]) (*connect.Response[pb.Repository], error)

func (*APIService) CreateUserKey

func (s *APIService) CreateUserKey(ctx context.Context, c *connect.Request[pb.CreateUserKeyRequest]) (*connect.Response[pb.UserKey], error)

func (*APIService) DeleteApplication

func (s *APIService) DeleteApplication(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) DeleteRepository

func (s *APIService) DeleteRepository(ctx context.Context, req *connect.Request[pb.RepositoryIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) DeleteUserKey

func (s *APIService) DeleteUserKey(ctx context.Context, c *connect.Request[pb.DeleteUserKeyRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) GetApplication

func (s *APIService) GetApplication(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[pb.Application], error)

func (*APIService) GetApplications

func (s *APIService) GetApplications(ctx context.Context, req *connect.Request[pb.GetApplicationsRequest]) (*connect.Response[pb.GetApplicationsResponse], error)

func (*APIService) GetAvailableDomains

func (s *APIService) GetAvailableDomains(ctx context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.AvailableDomains], error)

func (*APIService) GetAvailablePorts added in v0.3.0

func (s *APIService) GetAvailablePorts(ctx context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.AvailablePorts], error)

func (*APIService) GetBuild

func (s *APIService) GetBuild(ctx context.Context, req *connect.Request[pb.BuildIdRequest]) (*connect.Response[pb.Build], error)

func (*APIService) GetBuildArtifact

func (s *APIService) GetBuildArtifact(ctx context.Context, req *connect.Request[pb.ArtifactIdRequest]) (*connect.Response[pb.ArtifactContent], error)

func (*APIService) GetBuildLog

func (s *APIService) GetBuildLog(ctx context.Context, req *connect.Request[pb.BuildIdRequest]) (*connect.Response[pb.BuildLog], error)

func (*APIService) GetBuildLogStream

func (s *APIService) GetBuildLogStream(ctx context.Context, req *connect.Request[pb.BuildIdRequest], st *connect.ServerStream[pb.BuildLog]) error

func (*APIService) GetBuilds

func (s *APIService) GetBuilds(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[pb.GetBuildsResponse], error)

func (*APIService) GetEnvVars

func (s *APIService) GetEnvVars(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[pb.ApplicationEnvVars], error)

func (*APIService) GetMe

func (s *APIService) GetMe(ctx context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.User], error)

func (*APIService) GetOutput

func (s *APIService) GetOutput(ctx context.Context, req *connect.Request[pb.GetOutputRequest]) (*connect.Response[pb.GetOutputResponse], error)

func (*APIService) GetOutputStream

func (s *APIService) GetOutputStream(ctx context.Context, req *connect.Request[pb.GetOutputStreamRequest], st *connect.ServerStream[pb.ApplicationOutput]) error

func (*APIService) GetRepositories

func (s *APIService) GetRepositories(ctx context.Context, req *connect.Request[pb.GetRepositoriesRequest]) (*connect.Response[pb.GetRepositoriesResponse], error)

func (*APIService) GetRepository

func (s *APIService) GetRepository(ctx context.Context, req *connect.Request[pb.RepositoryIdRequest]) (*connect.Response[pb.Repository], error)

func (*APIService) GetSystemPublicKey

func (s *APIService) GetSystemPublicKey(_ context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetSystemPublicKeyResponse], error)

func (*APIService) GetUserKeys

func (s *APIService) GetUserKeys(ctx context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetUserKeysResponse], error)

func (*APIService) GetUsers added in v0.4.6

func (s *APIService) GetUsers(ctx context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.GetUsersResponse], error)

func (*APIService) RefreshRepository

func (s *APIService) RefreshRepository(ctx context.Context, req *connect.Request[pb.RepositoryIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) RetryCommitBuild

func (s *APIService) RetryCommitBuild(ctx context.Context, req *connect.Request[pb.RetryCommitBuildRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) SetEnvVar

func (s *APIService) SetEnvVar(ctx context.Context, req *connect.Request[pb.SetApplicationEnvVarRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) StartApplication

func (s *APIService) StartApplication(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) StopApplication

func (s *APIService) StopApplication(ctx context.Context, req *connect.Request[pb.ApplicationIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) UpdateApplication

func (s *APIService) UpdateApplication(ctx context.Context, req *connect.Request[pb.UpdateApplicationRequest]) (*connect.Response[emptypb.Empty], error)

func (*APIService) UpdateRepository

func (s *APIService) UpdateRepository(ctx context.Context, req *connect.Request[pb.UpdateRepositoryRequest]) (*connect.Response[emptypb.Empty], error)

type AuthHeader

type AuthHeader string

type AuthInterceptor

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

func NewAuthInterceptor

func NewAuthInterceptor(
	userRepo domain.UserRepository,
	header AuthHeader,
) *AuthInterceptor

func (*AuthInterceptor) WrapStreamingClient

func (a *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc

func (*AuthInterceptor) WrapStreamingHandler

func (a *AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc

func (*AuthInterceptor) WrapUnary

func (a *AuthInterceptor) WrapUnary(unaryFunc connect.UnaryFunc) connect.UnaryFunc

type ControllerBuilderService

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

func (*ControllerBuilderService) BroadcastBuilder

func (s *ControllerBuilderService) BroadcastBuilder(req *pb.BuilderRequest)

func (*ControllerBuilderService) ConnectBuilder

func (s *ControllerBuilderService) ConnectBuilder(ctx context.Context, st *connect.BidiStream[pb.BuilderResponse, pb.BuilderRequest]) error

func (*ControllerBuilderService) ListenBuildSettled

func (s *ControllerBuilderService) ListenBuildSettled() (sub <-chan struct{}, unsub func())

func (*ControllerBuilderService) ListenBuilderIdle

func (s *ControllerBuilderService) ListenBuilderIdle() (sub <-chan struct{}, unsub func())

func (*ControllerBuilderService) StartBuilds added in v0.4.10

func (s *ControllerBuilderService) StartBuilds(buildIDs []string)

type ControllerBuilderServiceClient

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

func (*ControllerBuilderServiceClient) ConnectBuilder

func (c *ControllerBuilderServiceClient) ConnectBuilder(ctx context.Context, onRequest func(req *pb.BuilderRequest), response <-chan *pb.BuilderResponse) error

type ControllerSSGenService

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

func (*ControllerSSGenService) BroadcastSSGen

func (s *ControllerSSGenService) BroadcastSSGen(req *pb.SSGenRequest)

func (*ControllerSSGenService) ConnectSSGen

func (s *ControllerSSGenService) ConnectSSGen(ctx context.Context, _ *connect.Request[emptypb.Empty], st *connect.ServerStream[pb.SSGenRequest]) error

type ControllerSSGenServiceClient

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

func (*ControllerSSGenServiceClient) ConnectSSGen

func (c *ControllerSSGenServiceClient) ConnectSSGen(ctx context.Context, onRequest func(req *pb.SSGenRequest)) error

type ControllerService

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

func (*ControllerService) CancelBuild

func (s *ControllerService) CancelBuild(_ context.Context, c *connect.Request[pb.BuildIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*ControllerService) FetchRepository

func (s *ControllerService) FetchRepository(_ context.Context, c *connect.Request[pb.RepositoryIdRequest]) (*connect.Response[emptypb.Empty], error)

func (*ControllerService) GetAvailableDomains added in v0.4.0

func (s *ControllerService) GetAvailableDomains(_ context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.AvailableDomains], error)

func (*ControllerService) GetAvailablePorts added in v0.4.0

func (s *ControllerService) GetAvailablePorts(_ context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[pb.AvailablePorts], error)

func (*ControllerService) RegisterBuilds

func (s *ControllerService) RegisterBuilds(_ context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)

func (*ControllerService) StreamBuildLog

func (s *ControllerService) StreamBuildLog(ctx context.Context, c *connect.Request[pb.BuildIdRequest], c2 *connect.ServerStream[pb.BuildLog]) error

func (*ControllerService) SyncDeployments

func (s *ControllerService) SyncDeployments(_ context.Context, _ *connect.Request[emptypb.Empty]) (*connect.Response[emptypb.Empty], error)

type ControllerServiceClient

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

func (*ControllerServiceClient) CancelBuild

func (c *ControllerServiceClient) CancelBuild(ctx context.Context, buildID string) error

func (*ControllerServiceClient) FetchRepository

func (c *ControllerServiceClient) FetchRepository(ctx context.Context, repositoryID string) error

func (*ControllerServiceClient) GetAvailableDomains added in v0.4.0

func (*ControllerServiceClient) GetAvailablePorts added in v0.4.0

func (*ControllerServiceClient) RegisterBuilds

func (c *ControllerServiceClient) RegisterBuilds(ctx context.Context) error

func (*ControllerServiceClient) StreamBuildLog

func (c *ControllerServiceClient) StreamBuildLog(ctx context.Context, buildID string) (<-chan *pb.BuildLog, error)

func (*ControllerServiceClient) SyncDeployments

func (c *ControllerServiceClient) SyncDeployments(ctx context.Context) error

type ControllerServiceClientConfig

type ControllerServiceClientConfig struct {
	URL string `mapstructure:"url" yaml:"url"`
}

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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