mongo

package
v0.0.0-...-c19637d Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBsonTagNotFoundError

func NewBsonTagNotFoundError(fieldName string) error

NewBsonTagNotFoundError creates bsonTagNotFoundError

func NewOperationNotSupportedError

func NewOperationNotSupportedError(operationName string) error

NewOperationNotSupportedError creates operationNotSupportedError

func NewUpdateOperatorNotSupportedError

func NewUpdateOperatorNotSupportedError(operator spec.UpdateOperator) error

NewUpdateOperatorNotSupportedError creates updateOperatorNotSupportedError

func NewUpdateTypeNotSupportedError

func NewUpdateTypeNotSupportedError(update spec.Update) error

NewUpdateTypeNotSupportedError creates updateTypeNotSupportedError

Types

type RepositoryGenerator

type RepositoryGenerator struct {
	InterfaceName string
	// contains filtered or unexported fields
}

RepositoryGenerator is a MongoDB repository generator that provides necessary information required to construct an implementation.

func NewGenerator

func NewGenerator(structModel code.Struct, interfaceName string) RepositoryGenerator

NewGenerator creates a new instance of MongoDB repository generator

func (RepositoryGenerator) GenerateConstructor

func (g RepositoryGenerator) GenerateConstructor() (codegen.FunctionBuilder, error)

GenerateConstructor creates codegen.FunctionBuilder of a constructor for mongo repository implementation struct.

func (RepositoryGenerator) GenerateMethod

func (g RepositoryGenerator) GenerateMethod(methodSpec spec.MethodSpec) (codegen.MethodBuilder, error)

GenerateMethod creates codegen.MethodBuilder of repository method from the provided method specification.

func (RepositoryGenerator) GenerateStruct

func (g RepositoryGenerator) GenerateStruct() codegen.StructBuilder

GenerateStruct creates codegen.StructBuilder of mongo repository implementation struct.

func (RepositoryGenerator) Imports

func (g RepositoryGenerator) Imports() [][]code.Import

Imports returns necessary imports for the mongo repository implementation.

Jump to

Keyboard shortcuts

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