Documentation ¶
Index ¶
- Constants
- func GetClientNetworkID(ctx context.Context) (string, error)
- func GetStreamGatewayId(stream grpc.ServerStream) (*protos.Identity_Gateway, error)
- func IsGateway(id *protos.Identity) bool
- func IsOperator(id *protos.Identity) bool
- func NewGateway(hwId, networkId, logicalId string) *protos.Identity
- func NewGatewayWildcard() *protos.Identity
- func NewNetwork(networkId string) *protos.Identity
- func NewNetworkWildcard() *protos.Identity
- func NewOperator(opId string) *protos.Identity
- func NewOperatorWildcard() *protos.Identity
Constants ¶
const CLIENT_CERT_SN_KEY = "x-magma-client-cert-serial"
Variables ¶
This section is empty.
Functions ¶
func GetClientNetworkID ¶
GetClientNetworkID looks up the Gateway caller retrieved from GRPC/HTTP Context (if present) where it's set by the middleware and returns the NetworkID associated to the gateway. For use by all Gateway facing cloud services.
func GetStreamGatewayId ¶
func GetStreamGatewayId(stream grpc.ServerStream) (*protos.Identity_Gateway, error)
GetStreamGatewayId returns a valid, non nil Gateway identity based on the stream's metadata CTX or error if no GW Identity can be found/verified
func IsOperator ¶
IsOperator Checks if it's an Identity of Operator and returns true if it is
func NewGateway ¶
NewGateway returns Gateway identity corresponding to given hardware network & logical gateway IDs
func NewGatewayWildcard ¶
NewGatewayWildcard returns Network Wildcard identity see protos/identity_helper.go
func NewNetwork ¶
NewNetwork returns Network identity corresponding to given networkId see protos/identity_helper.go
func NewNetworkWildcard ¶
NewNetworkWildcard returns Network Wildcard identity see protos/identity_helper.go
func NewOperator ¶
NewOperator returns Operator identity corresponding to given opId see protos/identity_helper.go
func NewOperatorWildcard ¶
NewOperatorWildcard returns Operator Wildcard identity see protos/identity_helper.go
Types ¶
This section is empty.