server

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPErrorHandler added in v0.21.1

func HTTPErrorHandler(ctx context.Context, mux *gateway.ServeMux, marshaler gateway.Marshaler, w http.ResponseWriter, r *http.Request, err error)

HTTPErrorHandler wraps gateway.DefaultHTTPErrorHandler to map gRPC unknown errors (i.e. errors without an explicit code) to HTTP status code 400 instead of 500.

Types

type Options added in v0.23.0

type Options struct {
	HTTPPort               int
	GRPCPort               int
	ExternalURL            string
	FrontendURL            string
	SessionKeyPairs        [][]byte
	AllowedOrigins         []string
	ServePrometheus        bool
	AuthDomain             string
	AuthClientID           string
	AuthClientSecret       string
	GithubAppName          string
	GithubAppWebhookSecret string
	GithubClientID         string
	GithubClientSecret     string
}

type Server

type Server struct {
	adminv1.UnsafeAdminServiceServer
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger, adm *admin.Service, issuer *runtimeauth.Issuer, limiter ratelimit.Limiter, opts *Options) (*Server, error)

func (*Server) AddOrganizationMember added in v0.24.0

func (*Server) AddProjectMember added in v0.24.0

func (*Server) CreateBookmark added in v0.30.0

CreateBookmark server creates a bookmark for the user per project

func (*Server) CreateProject

func (*Server) CreateService added in v0.31.0

CreateService creates a new service account.

func (*Server) CreateWhitelistedDomain added in v0.27.0

func (*Server) DeleteProject

func (*Server) DeleteService added in v0.31.0

DeleteService deletes a service account.

func (*Server) GetBookmark added in v0.30.0

GetBookmark server returns the bookmark for the user per project

func (*Server) GetCurrentUser added in v0.23.0

func (*Server) GetDeploymentCredentials added in v0.33.2

GetDeploymentCredentials returns runtime info and JWT on behalf of a specific user, or alternatively for a raw set of JWT attributes

func (*Server) GetGitCredentials added in v0.27.1

func (*Server) GetGithubRepoStatus added in v0.23.0

func (*Server) GetOrganization added in v0.23.0

func (*Server) GetProject added in v0.23.0

func (*Server) GetProjectVariables added in v0.24.0

func (*Server) GetUser added in v0.28.2

func (*Server) HTTPHandler added in v0.21.1

func (s *Server) HTTPHandler(ctx context.Context) (http.Handler, error)

HTTPHandler HTTP handler serving REST gateway.

func (*Server) IssueRepresentativeAuthToken added in v0.27.0

IssueRepresentativeAuthToken returns the temporary auth token for representing email

func (*Server) IssueServiceAuthToken added in v0.31.0

IssueServiceAuthToken issues a new auth token for a service account.

func (*Server) LeaveOrganization added in v0.24.0

func (*Server) ListBookmarks added in v0.30.0

Listbookmarks server returns the bookmarks for the user per project

func (*Server) ListOrganizationInvites added in v0.24.4

func (*Server) ListOrganizationMembers added in v0.24.0

func (*Server) ListOrganizations added in v0.23.0

func (*Server) ListProjectInvites added in v0.24.4

func (*Server) ListProjectMembers added in v0.24.0

func (*Server) ListProjectsForOrganization added in v0.24.0

func (*Server) ListServiceAuthTokens added in v0.31.0

ListServiceAuthTokens lists all auth tokens for a service account.

func (*Server) ListServices added in v0.31.0

ListServices lists all service accounts in an organization.

func (*Server) ListSuperusers added in v0.26.0

func (*Server) ListWhitelistedDomains added in v0.27.0

func (*Server) Ping added in v0.21.1

Ping implements AdminService

func (*Server) RemoveBookmark added in v0.30.0

RemoveBookmark server removes a bookmark for bookmark id

func (*Server) RemoveOrganizationMember added in v0.24.0

func (*Server) RemoveProjectMember added in v0.24.0

func (*Server) RemoveWhitelistedDomain added in v0.27.0

func (*Server) RevokeCurrentAuthToken added in v0.23.0

RevokeCurrentAuthToken revokes the current auth token

func (*Server) RevokeServiceAuthToken added in v0.31.0

RevokServiceAuthToken revokes an auth token for a service account.

func (*Server) SearchProjectNames added in v0.29.0

func (*Server) SearchProjectUsers added in v0.33.2

SearchProjectUsers returns a list of users that match the given search/email query.

func (*Server) SearchUsers added in v0.27.0

func (*Server) ServeGRPC added in v0.21.1

func (s *Server) ServeGRPC(ctx context.Context) error

ServeGRPC Starts the gRPC server.

func (*Server) ServeHTTP added in v0.21.1

func (s *Server) ServeHTTP(ctx context.Context) error

Starts the HTTP server.

func (*Server) SetOrganizationMemberRole added in v0.24.0

func (*Server) SetProjectMemberRole added in v0.24.0

func (*Server) SetSuperuser added in v0.26.0

func (*Server) SudoGetResource added in v0.27.3

func (*Server) SudoUpdateOrganizationQuotas added in v0.28.2

func (*Server) SudoUpdateUserQuotas added in v0.28.2

func (*Server) TriggerReconcile added in v0.24.3

func (*Server) TriggerRedeploy added in v0.24.3

func (*Server) TriggerRefreshSources added in v0.24.3

func (*Server) UpdateProject

func (*Server) UpdateProjectVariables added in v0.24.0

func (*Server) UpdateService added in v0.31.0

UpdateService updates a service account.

func (*Server) UpdateUserPreferences added in v0.30.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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