// itemToTrustedCluster attempts to decode the supplied `backend.Item` as
// a trusted cluster resource.
itemToTrustedCluster attempts to decode the supplied `backend.Item` as
a trusted cluster resource.
// itemToTrustedCluster attempts to decode the supplied ` backend . Item ` as // a trusted cluster resource .
func itemToTrustedCluster(item backend.Item) (services.TrustedCluster, error) {
	tc, err := services.GetTrustedClusterMarshaler().Unmarshal(
		item.Value,
		services.WithResourceID(item.ID),
		services.WithExpires(item.Expires),
	)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return tc, nil
}
func itemToTrustedCluster ( item backend . Item ) ( services . TrustedCluster , error ) { tc , err := services . GetTrustedClusterMarshaler ( ) . Unmarshal ( item . Value , services . WithResourceID ( item . ID ) , services . WithExpires ( item . Expires ) , ) if err != nil { return nil , trace . Wrap ( err ) } return tc , nil }
itemToTrustedCluster attempts to decode the supplied `backend.Item` as
a trusted cluster resource.
itemToTrustedCluster attempts to decode the supplied ` backend . Item ` as a trusted cluster resource .