mockiam

package
v0.0.0-...-b160be8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ServiceAccountSuffix = ".iam.gserviceaccount.com"

Variables

This section is empty.

Functions

func New

New creates a MockService

Types

type IAMServer

type IAMServer struct {
	*MockService
	pb.UnimplementedIAMServer
}

func (*IAMServer) CreateServiceAccount

func (s *IAMServer) CreateServiceAccount(ctx context.Context, req *pb.CreateServiceAccountRequest) (*pb.ServiceAccount, error)

Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].

func (*IAMServer) DeleteServiceAccount

func (s *IAMServer) DeleteServiceAccount(ctx context.Context, req *pb.DeleteServiceAccountRequest) (*emptypb.Empty, error)

func (*IAMServer) DisableServiceAccount

func (s *IAMServer) DisableServiceAccount(ctx context.Context, req *pb.DisableServiceAccountRequest) (*emptypb.Empty, error)

func (*IAMServer) EnableServiceAccount

func (s *IAMServer) EnableServiceAccount(ctx context.Context, req *pb.EnableServiceAccountRequest) (*emptypb.Empty, error)

func (*IAMServer) GetServiceAccount

func (s *IAMServer) GetServiceAccount(ctx context.Context, req *pb.GetServiceAccountRequest) (*pb.ServiceAccount, error)

Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].

func (*IAMServer) PatchServiceAccount

func (s *IAMServer) PatchServiceAccount(ctx context.Context, req *pb.PatchServiceAccountRequest) (*pb.ServiceAccount, error)

type MockService

type MockService struct {
	*common.MockEnvironment
	// contains filtered or unexported fields
}

MockService represents a mocked IAM service.

func (*MockService) ExpectedHosts

func (s *MockService) ExpectedHosts() []string

func (*MockService) NewHTTPMux

func (s *MockService) NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error)

func (*MockService) Register

func (s *MockService) Register(grpcServer *grpc.Server)

Jump to

Keyboard shortcuts

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