codegen_test

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageName = "all-kinds-of"
	PackageID   = "6d7e83e81a0a7960eec37340f5b11e7a61606bd9161f413684bc345c3f387948"
	SDKVersion  = "3.3.0-snapshot.20250417.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Accept

type Accept struct {
}

Accept is a Record type

func (Accept) MarshalJSON

func (t Accept) MarshalJSON() ([]byte, error)

func (Accept) ToMap

func (t Accept) ToMap() map[string]any

ToMap converts Accept to a map for DAML arguments

func (*Accept) UnmarshalJSON

func (t *Accept) UnmarshalJSON(data []byte) error

type Color

type Color string

Color is an enum type

const (
	ColorRed Color = "Red"

	ColorGreen Color = "Green"

	ColorBlue Color = "Blue"
)

func (Color) GetEnumConstructor

func (e Color) GetEnumConstructor() string

func (Color) GetEnumTypeID

func (e Color) GetEnumTypeID() string

func (Color) GetEnumTypeIDWithPackageID

func (e Color) GetEnumTypeIDWithPackageID(packageID string) string

GetEnumTypeIDWithPackageID returns the enum type ID using the provided package ID instead of package name

func (Color) MarshalJSON

func (e Color) MarshalJSON() ([]byte, error)

func (*Color) UnmarshalJSON

func (e *Color) UnmarshalJSON(data []byte) error

type MappyContract

type MappyContract struct {
	Operator types.PARTY   `json:"operator"`
	Value    types.TEXTMAP `json:"value"`
}

MappyContract is a Template type

func (MappyContract) Archive

func (t MappyContract) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this MappyContract contract This method uses the package name in the template ID

func (MappyContract) ArchiveWithPackageID

func (t MappyContract) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (MappyContract) CreateCommand

func (t MappyContract) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (MappyContract) CreateCommandWithPackageID

func (t MappyContract) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (MappyContract) GetTemplateID

func (t MappyContract) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (MappyContract) GetTemplateIDWithPackageID

func (t MappyContract) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (MappyContract) MarshalJSON

func (t MappyContract) MarshalJSON() ([]byte, error)

func (*MappyContract) UnmarshalJSON

func (t *MappyContract) UnmarshalJSON(data []byte) error

type MyPair

type MyPair struct {
	Left  any `json:"left"`
	Right any `json:"right"`
}

MyPair is a Record type

func (MyPair) MarshalJSON

func (t MyPair) MarshalJSON() ([]byte, error)

func (MyPair) ToMap

func (t MyPair) ToMap() map[string]any

ToMap converts MyPair to a map for DAML arguments

func (*MyPair) UnmarshalJSON

func (t *MyPair) UnmarshalJSON(data []byte) error

type OneOfEverything

type OneOfEverything struct {
	Operator        types.PARTY     `json:"operator"`
	SomeBoolean     types.BOOL      `json:"someBoolean"`
	SomeInteger     types.INT64     `json:"someInteger"`
	SomeDecimal     types.NUMERIC   `json:"someDecimal"`
	SomeMaybe       *types.INT64    `json:"someMaybe" hex:"optional"`
	SomeMaybeNot    *types.INT64    `json:"someMaybeNot" hex:"optional"`
	SomeText        types.TEXT      `json:"someText"`
	SomeDate        types.DATE      `json:"someDate"`
	SomeDatetime    types.TIMESTAMP `json:"someDatetime"`
	SomeSimpleList  []types.INT64   `json:"someSimpleList"`
	SomeSimplePair  MyPair          `json:"someSimplePair"`
	SomeNestedPair  MyPair          `json:"someNestedPair"`
	SomeUglyNesting VPair           `json:"someUglyNesting"`
	SomeMeasurement types.NUMERIC   `json:"someMeasurement"`
	SomeEnum        Color           `json:"someEnum"`
	TheUnit         types.UNIT      `json:"theUnit"`
}

OneOfEverything is a Template type

func (OneOfEverything) Accept

func (t OneOfEverything) Accept(contractID string, args Accept) *model.ExerciseCommand

Accept exercises the Accept choice on this OneOfEverything contract This method uses the package name in the template ID

func (OneOfEverything) AcceptWithPackageID

func (t OneOfEverything) AcceptWithPackageID(contractID string, packageID string, args Accept) *model.ExerciseCommand

AcceptWithPackageID exercises the Accept choice using the provided package ID instead of package name

func (OneOfEverything) Archive

func (t OneOfEverything) Archive(contractID string) *model.ExerciseCommand

Archive exercises the Archive choice on this OneOfEverything contract This method uses the package name in the template ID

func (OneOfEverything) ArchiveWithPackageID

func (t OneOfEverything) ArchiveWithPackageID(contractID string, packageID string) *model.ExerciseCommand

ArchiveWithPackageID exercises the Archive choice using the provided package ID instead of package name

func (OneOfEverything) CreateCommand

func (t OneOfEverything) CreateCommand() *model.CreateCommand

CreateCommand returns a CreateCommand for this template using the package name

func (OneOfEverything) CreateCommandWithPackageID

func (t OneOfEverything) CreateCommandWithPackageID(packageID string) *model.CreateCommand

CreateCommandWithPackageID returns a CreateCommand using the provided package ID instead of package name

func (OneOfEverything) GetTemplateID

func (t OneOfEverything) GetTemplateID() string

GetTemplateID returns the template ID for this template using the package name

func (OneOfEverything) GetTemplateIDWithPackageID

func (t OneOfEverything) GetTemplateIDWithPackageID(packageID string) string

GetTemplateIDWithPackageID returns the template ID using the provided package ID instead of package name

func (OneOfEverything) MarshalJSON

func (t OneOfEverything) MarshalJSON() ([]byte, error)

func (*OneOfEverything) UnmarshalJSON

func (t *OneOfEverything) UnmarshalJSON(data []byte) error

type Template

type Template interface {
	CreateCommand() *model.CreateCommand
	GetTemplateID() string
}

type VPair

type VPair struct {
	Left  *any   `json:"Left,omitempty"`
	Right *any   `json:"Right,omitempty"`
	Both  *VPair `json:"Both,omitempty"`
}

VPair is a variant/union type

func (VPair) GetVariantTag

func (v VPair) GetVariantTag() string

GetVariantTag implements types.VARIANT interface

func (VPair) GetVariantValue

func (v VPair) GetVariantValue() any

GetVariantValue implements types.VARIANT interface

func (VPair) MarshalJSON

func (v VPair) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling for VPair

func (*VPair) UnmarshalJSON

func (v *VPair) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshalling for VPair

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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