Documentation ¶
Index ¶
- type Byter
- type Field
- type FuncB
- func (f *FuncB) Bytes() []byte
- func (f *FuncB) Comment(c string) *FuncB
- func (f *FuncB) Commentf(format string, a ...interface{}) *FuncB
- func (f *FuncB) Description() []byte
- func (f *FuncB) Name(n string) *FuncB
- func (f *FuncB) Namef(format string, a ...interface{}) *FuncB
- func (f *FuncB) Parameter(name string, typ string) *FuncB
- func (f *FuncB) Parameters(p ...Parameter) *FuncB
- func (f *FuncB) Receiver(name string, typ string) *FuncB
- func (f *FuncB) ReturnTypes(p ...string) *FuncB
- func (f *FuncB) Signature() []byte
- func (f *FuncB) String() string
- func (f *FuncB) Write(b []byte) (n int, err error)
- func (f *FuncB) WriteString(s string) (n int, err error)
- func (f *FuncB) Writef(format string, a ...interface{}) (n int, err error)
- type InterfaceB
- func (i *InterfaceB) Bytes() []byte
- func (i *InterfaceB) Comment(comment string) *InterfaceB
- func (i *InterfaceB) Commentf(format string, args ...interface{}) *InterfaceB
- func (i *InterfaceB) Members(s ...Signaturer) *InterfaceB
- func (i *InterfaceB) Name(n string) *InterfaceB
- func (i *InterfaceB) Namef(format string, args ...interface{}) *InterfaceB
- func (i *InterfaceB) String() string
- type PackageB
- func (p *PackageB) Bytes() []byte
- func (p *PackageB) Comment(c string) *PackageB
- func (p *PackageB) Declarations(b ...Byter) *PackageB
- func (p *PackageB) Imports(i ...string) *PackageB
- func (p *PackageB) License(s string) *PackageB
- func (p *PackageB) Name(n string) *PackageB
- func (p *PackageB) Namef(format string, args ...interface{}) *PackageB
- func (p *PackageB) Read(b []byte) (int, error)
- func (p *PackageB) String() string
- func (p *PackageB) WriteTo(w io.Writer) (int64, error)
- type Parameter
- type Signaturer
- type StructB
- func (s *StructB) Bytes() []byte
- func (s *StructB) Comment(comment string) *StructB
- func (s *StructB) Commentf(format string, args ...interface{}) *StructB
- func (s *StructB) Field(name string, typeName string, tags ...StructTag) *StructB
- func (s *StructB) Fields(fields ...Field) *StructB
- func (s *StructB) Name(name string) *StructB
- func (s *StructB) Namef(format string, args ...interface{}) *StructB
- func (s *StructB) String() string
- type StructTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncB ¶
type FuncB struct {
// contains filtered or unexported fields
}
FuncB is a function builder
func (*FuncB) Description ¶
Description returns the description of the function, (as in, the top level comment)
func (*FuncB) Parameters ¶
Parameters sets the parameters of the function
func (*FuncB) ReturnTypes ¶
ReturnTypes sets the return types of the function
func (*FuncB) Signature ¶
Signature returns the signature of the function Useful for the interface builder
func (*FuncB) WriteString ¶ added in v0.3.0
WriteString writes a string into the body of the function
type InterfaceB ¶
type InterfaceB struct {
// contains filtered or unexported fields
}
InterfaceB is an interface builder
func (*InterfaceB) Bytes ¶ added in v0.4.0
func (i *InterfaceB) Bytes() []byte
Bytes returns a byte representation of the iface
func (*InterfaceB) Comment ¶
func (i *InterfaceB) Comment(comment string) *InterfaceB
Comment sets the comment on the interface
func (*InterfaceB) Commentf ¶ added in v0.3.0
func (i *InterfaceB) Commentf(format string, args ...interface{}) *InterfaceB
Commentf sets the comment on the interface using fmt.Sprintf
func (*InterfaceB) Members ¶
func (i *InterfaceB) Members(s ...Signaturer) *InterfaceB
Members adds members to the interface
func (*InterfaceB) Name ¶
func (i *InterfaceB) Name(n string) *InterfaceB
Name sets the name of the interface
func (*InterfaceB) Namef ¶ added in v0.3.0
func (i *InterfaceB) Namef(format string, args ...interface{}) *InterfaceB
Namef sets the name of the interface using fmt.Sprintf
func (*InterfaceB) String ¶
func (i *InterfaceB) String() string
String returns a string representation of the iface
type PackageB ¶
type PackageB struct {
// contains filtered or unexported fields
}
PackageB is a package builder
Do not edit once `Bytes`, `String`, `WriteTo`, `Write` or `Read` are called.
func (*PackageB) Declarations ¶
Declarations sets the declarations for the package
type Signaturer ¶
Signaturer is implemented by functions, which enables us to pass them to the interface builder
type StructB ¶
type StructB struct {
// contains filtered or unexported fields
}
StructB is a struct builder