Documentation ¶
Overview ¶
Package iamexample provides a reference implementation of a gRPC service that uses IAM for access management.
Index ¶
- Constants
- func NewMemberHeaderResolver() iamcaller.Resolver
- func SQLSchema() string
- func WithOutgoingMembers(ctx context.Context, members ...string) context.Context
- type Authorization
- type Config
- type Server
- func (s *Server) BatchGetShipments(ctx context.Context, request *iamexamplev1.BatchGetShipmentsRequest) (*iamexamplev1.BatchGetShipmentsResponse, error)
- func (s *Server) BatchGetSites(ctx context.Context, request *iamexamplev1.BatchGetSitesRequest) (*iamexamplev1.BatchGetSitesResponse, error)
- func (s *Server) CancelOperation(ctx context.Context, request *longrunning.CancelOperationRequest) (*emptypb.Empty, error)
- func (s *Server) CreateShipment(ctx context.Context, request *iamexamplev1.CreateShipmentRequest) (*iamexamplev1.Shipment, error)
- func (s *Server) CreateShipper(ctx context.Context, request *iamexamplev1.CreateShipperRequest) (*iamexamplev1.Shipper, error)
- func (s *Server) CreateSite(ctx context.Context, request *iamexamplev1.CreateSiteRequest) (*iamexamplev1.Site, error)
- func (s *Server) DeleteOperation(ctx context.Context, request *longrunning.DeleteOperationRequest) (*emptypb.Empty, error)
- func (s *Server) DeleteShipment(ctx context.Context, request *iamexamplev1.DeleteShipmentRequest) (*iamexamplev1.Shipment, error)
- func (s *Server) DeleteShipper(ctx context.Context, request *iamexamplev1.DeleteShipperRequest) (*longrunning.Operation, error)
- func (s *Server) DeleteSite(ctx context.Context, request *iamexamplev1.DeleteSiteRequest) (*iamexamplev1.Site, error)
- func (s *Server) GetIamPolicy(ctx context.Context, request *iam.GetIamPolicyRequest) (*iam.Policy, error)
- func (s *Server) GetOperation(ctx context.Context, request *longrunning.GetOperationRequest) (*longrunning.Operation, error)
- func (s *Server) GetRole(ctx context.Context, request *admin.GetRoleRequest) (*admin.Role, error)
- func (s *Server) GetShipment(ctx context.Context, request *iamexamplev1.GetShipmentRequest) (*iamexamplev1.Shipment, error)
- func (s *Server) GetShipper(ctx context.Context, request *iamexamplev1.GetShipperRequest) (*iamexamplev1.Shipper, error)
- func (s *Server) GetSite(ctx context.Context, request *iamexamplev1.GetSiteRequest) (*iamexamplev1.Site, error)
- func (s *Server) ListOperations(ctx context.Context, request *longrunning.ListOperationsRequest) (*longrunning.ListOperationsResponse, error)
- func (s *Server) ListRoles(ctx context.Context, request *admin.ListRolesRequest) (*admin.ListRolesResponse, error)
- func (s *Server) ListShipments(ctx context.Context, request *iamexamplev1.ListShipmentsRequest) (*iamexamplev1.ListShipmentsResponse, error)
- func (s *Server) ListShippers(ctx context.Context, request *iamexamplev1.ListShippersRequest) (*iamexamplev1.ListShippersResponse, error)
- func (s *Server) ListSites(ctx context.Context, request *iamexamplev1.ListSitesRequest) (*iamexamplev1.ListSitesResponse, error)
- func (s *Server) SearchSites(ctx context.Context, request *iamexamplev1.SearchSitesRequest) (*iamexamplev1.SearchSitesResponse, error)
- func (s *Server) SetIamPolicy(ctx context.Context, request *iam.SetIamPolicyRequest) (*iam.Policy, error)
- func (s *Server) TestIamPermissions(ctx context.Context, request *iam.TestIamPermissionsRequest) (*iam.TestIamPermissionsResponse, error)
- func (s *Server) UpdateShipment(ctx context.Context, request *iamexamplev1.UpdateShipmentRequest) (*iamexamplev1.Shipment, error)
- func (s *Server) UpdateShipper(ctx context.Context, request *iamexamplev1.UpdateShipperRequest) (*iamexamplev1.Shipper, error)
- func (s *Server) UpdateSite(ctx context.Context, request *iamexamplev1.UpdateSiteRequest) (*iamexamplev1.Site, error)
- func (s *Server) WaitOperation(ctx context.Context, request *longrunning.WaitOperationRequest) (*longrunning.Operation, error)
Constants ¶
const MemberHeader = "x-iam-example-members"
MemberHeader is the gRPC header used by the example server to determine IAM members of the caller.
Variables ¶
This section is empty.
Functions ¶
func NewMemberHeaderResolver ¶ added in v0.2.0
NewMemberHeaderResolver returns an iammember.Resolver that resolves members from MemberHeader.
Types ¶
type Authorization ¶
type Authorization struct { *iamexamplev1.FreightServiceAuthorization CallerResolver iamcaller.Resolver Next iamexamplev1.FreightServiceServer IAMServer *iamspanner.IAMServer IAMDescriptor *iamexamplev1.FreightServiceIAMDescriptor }
func (*Authorization) BatchGetShipments ¶
func (a *Authorization) BatchGetShipments( ctx context.Context, request *iamexamplev1.BatchGetShipmentsRequest, ) (*iamexamplev1.BatchGetShipmentsResponse, error)
func (*Authorization) UpdateShipment ¶
func (a *Authorization) UpdateShipment( ctx context.Context, request *iamexamplev1.UpdateShipmentRequest, ) (*iamexamplev1.Shipment, error)
type Server ¶
type Server struct { IAM *iamspanner.IAMServer Spanner *spanner.Client Config Config }
Server implements iamexamplev1.FreightServiceServer.
func (*Server) BatchGetShipments ¶
func (s *Server) BatchGetShipments( ctx context.Context, request *iamexamplev1.BatchGetShipmentsRequest, ) (*iamexamplev1.BatchGetShipmentsResponse, error)
BatchGetShipments implements iamexamplev1.FreightServiceServer.
func (*Server) BatchGetSites ¶
func (s *Server) BatchGetSites( ctx context.Context, request *iamexamplev1.BatchGetSitesRequest, ) (*iamexamplev1.BatchGetSitesResponse, error)
BatchGetSites implements iamexamplev1.FreightServiceServer.
func (*Server) CancelOperation ¶ added in v0.18.0
func (s *Server) CancelOperation( ctx context.Context, request *longrunning.CancelOperationRequest, ) (*emptypb.Empty, error)
CancelOperation implements longrunning.OperationsServer.
func (*Server) CreateShipment ¶
func (s *Server) CreateShipment( ctx context.Context, request *iamexamplev1.CreateShipmentRequest, ) (*iamexamplev1.Shipment, error)
func (*Server) CreateShipper ¶
func (s *Server) CreateShipper( ctx context.Context, request *iamexamplev1.CreateShipperRequest, ) (*iamexamplev1.Shipper, error)
CreateShipper implements iamexamplev1.FreightServiceServer.
func (*Server) CreateSite ¶
func (s *Server) CreateSite( ctx context.Context, request *iamexamplev1.CreateSiteRequest, ) (*iamexamplev1.Site, error)
CreateSite implements iamexamplev1.FreightServiceServer.
func (*Server) DeleteOperation ¶ added in v0.18.0
func (s *Server) DeleteOperation( ctx context.Context, request *longrunning.DeleteOperationRequest, ) (*emptypb.Empty, error)
DeleteOperation implements longrunning.OperationsServer.
func (*Server) DeleteShipment ¶
func (s *Server) DeleteShipment( ctx context.Context, request *iamexamplev1.DeleteShipmentRequest, ) (*iamexamplev1.Shipment, error)
DeleteShipment implements iamexamplev1.FreightServiceServer.
func (*Server) DeleteShipper ¶
func (s *Server) DeleteShipper( ctx context.Context, request *iamexamplev1.DeleteShipperRequest, ) (*longrunning.Operation, error)
DeleteShipper implements iamexamplev1.FreightServiceServer.
func (*Server) DeleteSite ¶
func (s *Server) DeleteSite( ctx context.Context, request *iamexamplev1.DeleteSiteRequest, ) (*iamexamplev1.Site, error)
DeleteSite implements iamexamplev1.FreightServiceServer.
func (*Server) GetIamPolicy ¶
func (s *Server) GetIamPolicy( ctx context.Context, request *iam.GetIamPolicyRequest, ) (*iam.Policy, error)
GetIamPolicy implements iam.IAMPolicyServer.
func (*Server) GetOperation ¶ added in v0.18.0
func (s *Server) GetOperation( ctx context.Context, request *longrunning.GetOperationRequest, ) (*longrunning.Operation, error)
GetOperation implements longrunning.OperationsServer.
func (*Server) GetRole ¶ added in v0.21.0
func (s *Server) GetRole( ctx context.Context, request *admin.GetRoleRequest, ) (*admin.Role, error)
GetRole implements admin.IAMServer.
func (*Server) GetShipment ¶
func (s *Server) GetShipment( ctx context.Context, request *iamexamplev1.GetShipmentRequest, ) (*iamexamplev1.Shipment, error)
GetShipment implements iamexamplev1.FreightServiceServer.
func (*Server) GetShipper ¶
func (s *Server) GetShipper( ctx context.Context, request *iamexamplev1.GetShipperRequest, ) (*iamexamplev1.Shipper, error)
GetShipper implements iamexamplev1.FreightServiceServer.
func (*Server) GetSite ¶
func (s *Server) GetSite( ctx context.Context, request *iamexamplev1.GetSiteRequest, ) (*iamexamplev1.Site, error)
GetSite implements iamexamplev1.FreightServiceServer.
func (*Server) ListOperations ¶ added in v0.18.0
func (s *Server) ListOperations( ctx context.Context, request *longrunning.ListOperationsRequest, ) (*longrunning.ListOperationsResponse, error)
ListOperations implements longrunning.OperationsServer.
func (*Server) ListRoles ¶ added in v0.16.0
func (s *Server) ListRoles( ctx context.Context, request *admin.ListRolesRequest, ) (*admin.ListRolesResponse, error)
ListRoles implements admin.IAMServer.
func (*Server) ListShipments ¶
func (s *Server) ListShipments( ctx context.Context, request *iamexamplev1.ListShipmentsRequest, ) (*iamexamplev1.ListShipmentsResponse, error)
ListShipments implements iamexamplev1.FreightServiceServer.
func (*Server) ListShippers ¶
func (s *Server) ListShippers( ctx context.Context, request *iamexamplev1.ListShippersRequest, ) (*iamexamplev1.ListShippersResponse, error)
ListShippers implements iamexamplev1.FreightServiceServer.
func (*Server) ListSites ¶
func (s *Server) ListSites( ctx context.Context, request *iamexamplev1.ListSitesRequest, ) (*iamexamplev1.ListSitesResponse, error)
ListSites implements iamexamplev1.FreightServiceServer.
func (*Server) SearchSites ¶
func (s *Server) SearchSites( ctx context.Context, request *iamexamplev1.SearchSitesRequest, ) (*iamexamplev1.SearchSitesResponse, error)
func (*Server) SetIamPolicy ¶
func (s *Server) SetIamPolicy( ctx context.Context, request *iam.SetIamPolicyRequest, ) (*iam.Policy, error)
SetIamPolicy implements iam.IAMPolicyServer.
func (*Server) TestIamPermissions ¶
func (s *Server) TestIamPermissions( ctx context.Context, request *iam.TestIamPermissionsRequest, ) (*iam.TestIamPermissionsResponse, error)
TestIamPermissions implements iam.IAMPolicyServer.
func (*Server) UpdateShipment ¶
func (s *Server) UpdateShipment( ctx context.Context, request *iamexamplev1.UpdateShipmentRequest, ) (*iamexamplev1.Shipment, error)
UpdateShipment implements iamexamplev1.FreightServiceServer.
func (*Server) UpdateShipper ¶
func (s *Server) UpdateShipper( ctx context.Context, request *iamexamplev1.UpdateShipperRequest, ) (*iamexamplev1.Shipper, error)
UpdateShipper implements iamexamplev1.FreightServiceServer.
func (*Server) UpdateSite ¶
func (s *Server) UpdateSite( ctx context.Context, request *iamexamplev1.UpdateSiteRequest, ) (*iamexamplev1.Site, error)
UpdateSite implements iamexamplev1.FreightServiceServer.
func (*Server) WaitOperation ¶ added in v0.18.0
func (s *Server) WaitOperation( ctx context.Context, request *longrunning.WaitOperationRequest, ) (*longrunning.Operation, error)
WaitOperation implements longrunning.OperationsServer.
Source Files ¶
- authorization.go
- caller.go
- convert_shipments.go
- convert_shippers.go
- convert_sites.go
- doc.go
- schema.go
- server.go
- server_iam.go
- server_longrunning.go
- server_shipments_batchget.go
- server_shipments_create.go
- server_shipments_delete.go
- server_shipments_get.go
- server_shipments_list.go
- server_shipments_update.go
- server_shippers_create.go
- server_shippers_delete.go
- server_shippers_get.go
- server_shippers_list.go
- server_shippers_update.go
- server_sites_batchget.go
- server_sites_create.go
- server_sites_delete.go
- server_sites_get.go
- server_sites_list.go
- server_sites_search.go
- server_sites_update.go
Directories ¶
Path | Synopsis |
---|---|
Package iamexampledata provides predefined example data for the IAM example service.
|
Package iamexampledata provides predefined example data for the IAM example service. |