builder

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package builder hosts the builder interfaces and implementation which are responsible of creating the go source classes that implement the pina-golada interfaces.

Index

Constants

This section is empty.

Variables

View Source
var (
	// IdentifierString is pasted in the first line of each file and will mark a
	// file as a pina golada generated file. It adheres to the Go rules to mark
	// files as generated:
	// https://github.com/golang/go/issues/13560#issuecomment-288457920
	IdentifierString = "// Code generated by pina-golada (https://github.com/homeport/pina-golada). DO NOT EDIT."

	// InternalDecompressMethod defines the method that is generated by pina-golada to decompress
	// a given hex string. It cannot be defined by an interface
	InternalDecompressMethod = "requestAssetByPath"
)

Functions

This section is empty.

Types

type Builder

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

Builder is able to build a file

func NewBuilder

func NewBuilder(target *inspector.AstInterface,
	interfaceAnnotation *PinaGoladaInterface,
	parser annotation.Parser,
	l logger.Logger) *Builder

NewBuilder Creates a new builder instance

func (Builder) BuildFile

func (b Builder) BuildFile() (by []byte, err error)

BuildFile Builds the file

type DevNullWriter added in v1.2.7

type DevNullWriter struct {
}

DevNullWriter simply does nothing but implement writer

func (DevNullWriter) Write added in v1.2.7

func (DevNullWriter) Write(p []byte) (n int, err error)

Write writes literally nothing

type PinaGoladaInterface

type PinaGoladaInterface struct {
	Injector string `yaml:"injector"`
}

PinaGoladaInterface is the struct used for the pina golada interface annotation

func (PinaGoladaInterface) GetIdentifier

func (PinaGoladaInterface) GetIdentifier() string

GetIdentifier returns the identifier of the interface

type PinaGoladaMethod

type PinaGoladaMethod struct {
	Asset        string `yaml:"asset"`
	Compressor   string `yaml:"compressor"`
	AbsolutePath bool   `yaml:"absolute"`
}

PinaGoladaMethod is the struct used for the pina golada interface annotation

func (PinaGoladaMethod) GetIdentifier

func (PinaGoladaMethod) GetIdentifier() string

GetIdentifier returns the identifier of the interface

Jump to

Keyboard shortcuts

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