mockiam

package
v0.0.0-...-8078c5c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type MockService

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

MockService represents a mocked IAM service.

func New

func New(env *common.MockEnvironment, storage storage.Storage) *MockService

New creates a MockService

func (*MockService) ExpectedHost

func (s *MockService) ExpectedHost() 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)

type ServerV1

type ServerV1 struct {
	*MockService
	pb.UnimplementedIAMServer
}

func (*ServerV1) CreateServiceAccount

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

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

func (*ServerV1) DeleteServiceAccount

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

func (*ServerV1) DisableServiceAccount

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

func (*ServerV1) EnableServiceAccount

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

func (*ServerV1) GetServiceAccount

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

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

func (*ServerV1) PatchServiceAccount

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

Jump to

Keyboard shortcuts

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