cosmos-sdk/schema/struct.go
Aaron Craelius 73ee336359
feat(schema): add API descriptors, struct, oneof & list types, and wire encoding spec (#21482)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Marko <marko@baricevic.me>
2024-10-01 07:40:42 +00:00

22 lines
822 B
Go

package schema
// StructType represents a struct type.
// Support for this is currently UNIMPLEMENTED, this notice will be removed when it is added.
type StructType struct {
// Name is the name of the struct type.
Name string
// Fields is the list of fields in the struct.
// It is a COMPATIBLE change to add new fields to an unsealed struct,
// but it is an INCOMPATIBLE change to add new fields to a sealed struct.
//
// A sealed struct cannot reference any unsealed structs directly or
// transitively because these types allow adding new fields.
Fields []Field
// Sealed is true if it is an INCOMPATIBLE change to add new fields to the struct.
// It is a COMPATIBLE change to change an unsealed struct to sealed, but it is
// an INCOMPATIBLE change to change a sealed struct to unsealed.
Sealed bool
}