Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generated

type Generated struct {
	RawInterfaces,
	Interfaces,
	Structs,
	Constructors,
	Implementations,
	RawCrud,
	Crud,
	Names []string
}

Generated is a struct containing generated code

func Convert

func Convert(
	other,
	toConvert []map[interface{}]interface{},
	rawSuffix,
	interfaceSuffix,
	packageName string,
) (*Generated, error)

Convert converts given maps describing schemas to go structs args:

other []map[interface{}]interface{} - maps describing schemas than
                                      should not be converted to go structs
toConvert []map[interface{}]interface{} - maps describing schemas that
                                          should be converted to go structs
annotationDB string - annotation added to each field in schemas
annotationObject string - annotation added to each field in objects
suffix string - suffix added to each type name

return:

  1. list of go interfaces as strings
  2. list of go structs as strings
  3. list of implementations of interfaces as strings
  4. error during execution

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

Schema is a for a gohan schema

func (*Schema) Name

func (schema *Schema) Name() string

Name is a function that allows schema to be used as a set element

Jump to

Keyboard shortcuts

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