package app import egressutilpkg "selective-vpn-api/app/egressutil" func parseEgressScope(raw string) (egressScopeTarget, error) { target, err := egressutilpkg.ParseScope(raw, sanitizeID) if err != nil { return egressScopeTarget{}, err } return egressScopeTarget{ Scope: target.Scope, Source: target.Source, SourceID: target.SourceID, }, nil } func egressIdentityChanged(prev, next EgressIdentity) bool { return egressutilpkg.IdentityChanged( egressIdentitySnapshot(prev), egressIdentitySnapshot(next), ) } func egressIdentitySnapshot(item EgressIdentity) egressutilpkg.IdentitySnapshot { return egressutilpkg.IdentitySnapshot{ IP: item.IP, CountryCode: item.CountryCode, CountryName: item.CountryName, UpdatedAt: item.UpdatedAt, Stale: item.Stale, RefreshInProgress: item.RefreshInProgress, LastError: item.LastError, NextRetryAt: item.NextRetryAt, } }