Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupAclExpression(policy *objects.Policy)
- func GenerateDiffChangeMessage(newData []string, updateData []string, deleteData []string) (string, error)
- func GenerateDiffChangeUpdateMessage(name string, item MigrateItem) (string, error)
- func GetDiffChangeMessage(items []MigrateItem) string
- func Migrate(config *raiden.Config, policies []MigrateItem, stateChan chan any, ...) []error
- type CompareDiffResult
- type MigrateActionFunc
- type MigrateItem
Constants ¶
View Source
const DiffChangeTemplate = `` /* 327-byte string literal not displayed */
----- diff change -----
View Source
const DiffChangeUpdateTemplate = `` /* 168-byte string literal not displayed */
Variables ¶
View Source
var ActionFunc = MigrateActionFunc{ CreateFunc: supabase.CreatePolicy, UpdateFunc: supabase.UpdatePolicy, DeleteFunc: supabase.DeletePolicy, }
View Source
var Logger hclog.Logger = logger.HcLog().Named("resource.policies")
Functions ¶
func CleanupAclExpression ¶
func GenerateDiffChangeUpdateMessage ¶
func GenerateDiffChangeUpdateMessage(name string, item MigrateItem) (string, error)
func GetDiffChangeMessage ¶
func GetDiffChangeMessage(items []MigrateItem) string
func Migrate ¶
func Migrate(config *raiden.Config, policies []MigrateItem, stateChan chan any, actions MigrateActionFunc) []error
Types ¶
type CompareDiffResult ¶
type CompareDiffResult struct { Name string SourceResource objects.Policy TargetResource objects.Policy DiffItems objects.UpdatePolicyParam IsConflict bool }
func CompareItem ¶
func CompareItem(source, target objects.Policy) (diffResult CompareDiffResult)
func CompareList ¶
func CompareList(sourcePolicies, targetPolicies []objects.Policy) (diffResult []CompareDiffResult)
type MigrateActionFunc ¶
type MigrateActionFunc = migrator.MigrateActionFunc[objects.Policy, objects.UpdatePolicyParam]
type MigrateItem ¶
type MigrateItem = migrator.MigrateItem[objects.Policy, objects.UpdatePolicyParam]
func BuildMigrateData ¶
func BuildMigrateData(extractedLocalData state.ExtractedPolicies, supabaseData []objects.Policy) (migrateData []MigrateItem, err error)
func BuildMigrateItem ¶
func BuildMigrateItem(supabaseData, localData []objects.Policy) (migrateData []MigrateItem, err error)
Click to show internal directories.
Click to hide internal directories.