Documentation ¶
Index ¶
- Constants
- Variables
- func Compare(source []objects.Function, target []objects.Function) error
- func GenerateDiffChangeMessage(newData []string, updateData []string, deleteData []string) (string, error)
- func GenerateDiffMessage(name string, value, changeValue string) (string, error)
- func GetDiffChangeMessage(items []MigrateItem) string
- func GetNewCountData(supabaseData []objects.Function, localData state.ExtractRpcResult) int
- func Migrate(config *raiden.Config, rpc []MigrateItem, stateChan chan any, ...) []error
- func PrintDiff(diffData CompareDiffResult)
- func PrintDiffResult(diffResult []CompareDiffResult) error
- type CompareDiffResult
- type MigrateActionFunc
- type MigrateItem
Constants ¶
View Source
const DiffChangeTemplate = `` /* 318-byte string literal not displayed */
----- diff change -----
View Source
const DiffTemplate = `
{{.Head}}
{{.Body}}
{{.End}}
`
----- generate message section ------
Variables ¶
View Source
var ActionFunc = MigrateActionFunc{ CreateFunc: supabase.CreateFunction, UpdateFunc: func(cfg *raiden.Config, param objects.Function, items any) (err error) { return supabase.UpdateFunction(cfg, param) }, DeleteFunc: supabase.DeleteFunction, }
View Source
var Logger hclog.Logger = logger.HcLog().Named("resource.rpc")
Functions ¶
func GenerateDiffMessage ¶
func GetDiffChangeMessage ¶
func GetDiffChangeMessage(items []MigrateItem) string
func GetNewCountData ¶
func GetNewCountData(supabaseData []objects.Function, localData state.ExtractRpcResult) int
func Migrate ¶
func Migrate(config *raiden.Config, rpc []MigrateItem, stateChan chan any, actions MigrateActionFunc) []error
func PrintDiff ¶
func PrintDiff(diffData CompareDiffResult)
func PrintDiffResult ¶
func PrintDiffResult(diffResult []CompareDiffResult) error
----- print diff section -----
Types ¶
type CompareDiffResult ¶
type CompareDiffResult struct { Name string SourceResource objects.Function TargetResource objects.Function IsConflict bool }
func CompareItem ¶
func CompareItem(source, target objects.Function) (diffResult CompareDiffResult)
func CompareList ¶
type MigrateActionFunc ¶
type MigrateActionFunc = migrator.MigrateActionFunc[objects.Function, any]
type MigrateItem ¶
type MigrateItem = migrator.MigrateItem[objects.Function, any]
func BuildMigrateData ¶
func BuildMigrateData(extractedLocalData state.ExtractRpcResult, supabaseData []objects.Function) (migrateData []MigrateItem, err error)
func BuildMigrateItem ¶
Click to show internal directories.
Click to hide internal directories.