policies

package
v1.0.0-beta.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 CleanupAclExpression(policy *objects.Policy)

func GenerateDiffChangeMessage

func GenerateDiffChangeMessage(newData []string, updateData []string, deleteData []string) (string, error)

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 MigrateItem

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL