Documentation
¶
Index ¶
- Constants
- func New(env *common.MockEnvironment, storage storage.Storage) mockgcpregistry.MockService
- type IAMServer
- func (s *IAMServer) CreateServiceAccount(ctx context.Context, req *pb.CreateServiceAccountRequest) (*pb.ServiceAccount, error)
- func (s *IAMServer) DeleteServiceAccount(ctx context.Context, req *pb.DeleteServiceAccountRequest) (*emptypb.Empty, error)
- func (s *IAMServer) DisableServiceAccount(ctx context.Context, req *pb.DisableServiceAccountRequest) (*emptypb.Empty, error)
- func (s *IAMServer) EnableServiceAccount(ctx context.Context, req *pb.EnableServiceAccountRequest) (*emptypb.Empty, error)
- func (s *IAMServer) GetServiceAccount(ctx context.Context, req *pb.GetServiceAccountRequest) (*pb.ServiceAccount, error)
- func (s *IAMServer) PatchServiceAccount(ctx context.Context, req *pb.PatchServiceAccountRequest) (*pb.ServiceAccount, error)
- type MockService
Constants ¶
View Source
const ServiceAccountSuffix = ".iam.gserviceaccount.com"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(env *common.MockEnvironment, storage storage.Storage) mockgcpregistry.MockService
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 (*IAMServer) DisableServiceAccount ¶
func (*IAMServer) EnableServiceAccount ¶
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)
Click to show internal directories.
Click to hide internal directories.