classes

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Code generated from Pkl module `classes`. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animal

type Animal interface {
	GetName() string
}

type Cat

type Cat interface {
	Animal

	GetMeows() bool
}

type CatImpl

type CatImpl struct {
	Meows bool `pkl:"meows"`

	Name string `pkl:"name"`
}

func (*CatImpl) GetMeows

func (rcv *CatImpl) GetMeows() bool

func (*CatImpl) GetName

func (rcv *CatImpl) GetName() string

type Classes

type Classes struct {
	Animals []Animal `pkl:"animals"`

	MyAnimal Animal `pkl:"myAnimal"`

	House *House `pkl:"house"`
}

func Load

func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Classes, error)

Load loads the pkl module at the given source and evaluates it with the given evaluator into a Classes

func LoadFromPath

func LoadFromPath(ctx context.Context, path string) (ret *Classes, err error)

LoadFromPath loads the pkl module at the given path and evaluates it into a Classes

type Dog

type Dog interface {
	Animal

	GetBarks() bool

	GetBreed() string
}

type DogImpl

type DogImpl struct {
	Barks bool `pkl:"barks"`

	Breed string `pkl:"breed"`

	Name string `pkl:"name"`
}

func (*DogImpl) GetBarks

func (rcv *DogImpl) GetBarks() bool

func (*DogImpl) GetBreed

func (rcv *DogImpl) GetBreed() string

func (*DogImpl) GetName

func (rcv *DogImpl) GetName() string

type Greyhound

type Greyhound interface {
	Dog

	GetCanRoach() bool
}

type GreyhoundImpl

type GreyhoundImpl struct {
	*DogImpl

	CanRoach bool `pkl:"canRoach"`
}

func (*GreyhoundImpl) GetCanRoach

func (rcv *GreyhoundImpl) GetCanRoach() bool

type House

type House struct {
	Area int `pkl:"area"`

	Bedrooms int `pkl:"bedrooms"`

	Bathrooms int `pkl:"bathrooms"`
}

Jump to

Keyboard shortcuts

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