server

package
v0.76.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IS

type IS struct {
	v1.UnimplementedUsersInternalServiceServer
	// contains filtered or unexported fields
}

IS is an internal server.

func NewInternal

func NewInternal(store *store.S) *IS

NewInternal creates an internal server.

func (*IS) ListInternalAPIKeys added in v0.68.0

func (s *IS) ListInternalAPIKeys(
	ctx context.Context,
	req *v1.ListInternalAPIKeysRequest,
) (*v1.ListInternalAPIKeysResponse, error)

ListInternalAPIKeys lists all API keys.

func (*IS) ListInternalOrganizations added in v0.68.0

func (s *IS) ListInternalOrganizations(ctx context.Context, req *v1.ListInternalOrganizationsRequest) (*v1.ListInternalOrganizationsResponse, error)

ListInternalOrganizations lists all organizations.

func (*IS) ListOrganizationUsers added in v0.13.0

func (s *IS) ListOrganizationUsers(ctx context.Context, req *v1.ListOrganizationUsersRequest) (*v1.ListOrganizationUsersResponse, error)

ListOrganizationUsers lists organization users for all organizations.

func (*IS) ListProjectUsers added in v0.37.0

func (s *IS) ListProjectUsers(ctx context.Context, req *v1.ListProjectUsersRequest) (*v1.ListProjectUsersResponse, error)

ListProjectUsers lists project users for all projects.

func (*IS) ListProjects added in v0.37.0

func (s *IS) ListProjects(ctx context.Context, req *v1.ListProjectsRequest) (*v1.ListProjectsResponse, error)

ListProjects lists all projects.

func (*IS) Run

func (s *IS) Run(port int) error

Run starts the gRPC server.

type S

type S struct {
	v1.UnimplementedUsersServiceServer
	// contains filtered or unexported fields
}

S is a server.

func New

func New(store *store.S) *S

New creates a server.

func (*S) CreateAPIKey

func (s *S) CreateAPIKey(
	ctx context.Context,
	req *v1.CreateAPIKeyRequest,
) (*v1.APIKey, error)

CreateAPIKey creates an API key.

func (*S) CreateDefaultOrganization added in v0.16.0

func (s *S) CreateDefaultOrganization(ctx context.Context, c *config.DefaultOrganizationConfig) (*store.Organization, error)

CreateDefaultOrganization creates the default org. TODO(kenji): This is not the best place for this function as there is nothing related to the server itself.

func (*S) CreateDefaultProject added in v0.37.0

func (s *S) CreateDefaultProject(ctx context.Context, c *config.DefaultProjectConfig, orgID, tenantID string) error

CreateDefaultProject creates the default org. TODO(kenji): This is not the best place for this function as there is nothing related to the server itself.

func (*S) CreateOrganization added in v0.10.0

func (s *S) CreateOrganization(ctx context.Context, req *v1.CreateOrganizationRequest) (*v1.Organization, error)

CreateOrganization creates a new organization.

func (*S) CreateOrganizationUser added in v0.20.0

func (s *S) CreateOrganizationUser(ctx context.Context, req *v1.CreateOrganizationUserRequest) (*v1.OrganizationUser, error)

CreateOrganizationUser adds a user to an organization.

func (*S) CreateProject added in v0.37.0

func (s *S) CreateProject(ctx context.Context, req *v1.CreateProjectRequest) (*v1.Project, error)

CreateProject creates a new project.

func (*S) CreateProjectUser added in v0.37.0

func (s *S) CreateProjectUser(ctx context.Context, req *v1.CreateProjectUserRequest) (*v1.ProjectUser, error)

CreateProjectUser adds a user to an project.

func (*S) DeleteAPIKey

func (s *S) DeleteAPIKey(
	ctx context.Context,
	req *v1.DeleteAPIKeyRequest,
) (*v1.DeleteAPIKeyResponse, error)

DeleteAPIKey deletes an API key.

func (*S) DeleteOrganization added in v0.10.0

func (s *S) DeleteOrganization(ctx context.Context, req *v1.DeleteOrganizationRequest) (*v1.DeleteOrganizationResponse, error)

DeleteOrganization deletes an organization.

func (*S) DeleteOrganizationUser added in v0.22.0

func (s *S) DeleteOrganizationUser(ctx context.Context, req *v1.DeleteOrganizationUserRequest) (*emptypb.Empty, error)

DeleteOrganizationUser deletes an organization user.

func (*S) DeleteProject added in v0.37.0

func (s *S) DeleteProject(ctx context.Context, req *v1.DeleteProjectRequest) (*v1.DeleteProjectResponse, error)

DeleteProject deletes an project.

func (*S) DeleteProjectUser added in v0.37.0

func (s *S) DeleteProjectUser(ctx context.Context, req *v1.DeleteProjectUserRequest) (*emptypb.Empty, error)

DeleteProjectUser deletes an project user.

func (*S) ListAPIKeys

func (s *S) ListAPIKeys(
	ctx context.Context,
	req *v1.ListAPIKeysRequest,
) (*v1.ListAPIKeysResponse, error)

ListAPIKeys lists API keys.

func (*S) ListOrganizationUsers added in v0.21.0

func (s *S) ListOrganizationUsers(ctx context.Context, req *v1.ListOrganizationUsersRequest) (*v1.ListOrganizationUsersResponse, error)

ListOrganizationUsers lists organization users for the specified organization.

func (*S) ListOrganizations added in v0.10.0

func (s *S) ListOrganizations(ctx context.Context, req *v1.ListOrganizationsRequest) (*v1.ListOrganizationsResponse, error)

ListOrganizations lists all organizations.

func (*S) ListProjectUsers added in v0.37.0

func (s *S) ListProjectUsers(ctx context.Context, req *v1.ListProjectUsersRequest) (*v1.ListProjectUsersResponse, error)

ListProjectUsers lists project users for the specified project.

func (*S) ListProjects added in v0.37.0

func (s *S) ListProjects(ctx context.Context, req *v1.ListProjectsRequest) (*v1.ListProjectsResponse, error)

ListProjects lists all projects.

func (*S) Run

func (s *S) Run(ctx context.Context, port int, authConfig config.AuthConfig) error

Run starts the gRPC server.

func (*S) Stop

func (s *S) Stop()

Stop stops the gRPC server.

Jump to

Keyboard shortcuts

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