-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bastian/update-stable-cadence
- Loading branch information
Showing
33 changed files
with
815 additions
and
471 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @chasefleming @bjartek @bthaile | ||
* @bjartek @bthaile @ianthpun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package flixkit | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/onflow/flixkit-go/internal" | ||
) | ||
|
||
type FlixService interface { | ||
// GetTemplate returns the raw flix template | ||
GetTemplate(ctx context.Context, templateName string) (string, string, error) | ||
// GetAndReplaceImports returns the raw flix template with cadence imports replaced | ||
GetTemplateAndReplaceImports(ctx context.Context, templateName string, network string) (*FlowInteractionTemplateExecution, error) | ||
// GenerateBinding returns the generated binding given the language | ||
GetTemplateAndCreateBinding(ctx context.Context, templateName string, lang string, destFile string) (string, error) | ||
// GenerateTemplate returns the generated raw template | ||
CreateTemplate(ctx context.Context, contractInfos ContractInfos, code string, preFill string) (string, error) | ||
} | ||
|
||
// FlowInteractionTemplateCadence is the interface returned from Replacing imports, it provides helper methods to assist in executing the resulting Cadence. | ||
type FlowInteractionTemplateExecution = internal.FlowInteractionTemplateExecution | ||
|
||
// ContractInfos is an input into generating a template, it is a map of contract name to network information of deployed contracts of the source Cadence code. | ||
type ContractInfos = internal.ContractInfos | ||
type NetworkAddressMap = internal.NetworkAddressMap | ||
|
||
// FlixServiceConfig is the configuration for the FlixService that provides a override for FlixServerURL and default values for FileReader and Logger. | ||
type FlixServiceConfig = internal.FlixServiceConfig | ||
|
||
// NewFlixService returns a new FlixService given a FlixServiceConfig | ||
func NewFlixService(config *FlixServiceConfig) FlixService { | ||
return internal.NewFlixService(config) | ||
} |
Oops, something went wrong.