models

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Postgres validDatabase = "postgres"
	MariaDB  validDatabase = "mariadb"
	Sqlite   validDatabase = "sqlite"
)

Variables

This section is empty.

Functions

func GetTypeForTypeName

func GetTypeForTypeName(name string) types.Type

GetTypeForTypeName blah

Types

type Coder

type Coder interface {
	Code() jen.Code
}

func NewCodeWrapper

func NewCodeWrapper(c jen.Code) Coder

NewCodeWrapper creates a new codeWrapper from some code

type DataField

type DataField struct {
	Name                  wordsmith.SuperPalabra
	Type                  string
	UnderlyingType        types.Type
	Pos                   token.Pos
	Pointer               bool
	DefaultValue          string
	ValidForCreationInput bool
	ValidForUpdateInput   bool
}

DataField represents a data model's field

type DataType

type DataType struct {
	Name             wordsmith.SuperPalabra
	Struct           *types.Struct
	BelongsToUser    bool
	IsEnumeration    bool
	RestrictedToUser bool
	SearchEnabled    bool
	BelongsToStruct  wordsmith.SuperPalabra
	Fields           []DataField
}

DataType represents a data model

func BuildOwnershipChain

func BuildOwnershipChain(names ...string) (out []DataType)

BuildOwnershipChain takes a series of names and returns a slice of datatypes with ownership between them. So for instance, if you provided `Forum`, `Subforum`, and `Post` as input, the output would be:

[]DataType{
	{
		Name: wordsmith.FromSingularPascalCase("Forum"),
	},
	{
		Name:            wordsmith.FromSingularPascalCase("Subforum"),
		BelongsToEnumeration: wordsmith.FromSingularPascalCase("Forum"),
	},
	{
		Name:            wordsmith.FromSingularPascalCase("Post"),
		BelongsToEnumeration: wordsmith.FromSingularPascalCase("Subforum"),
	},
}

func (DataType) BuildArgsForDBQuerierExistenceMethodTest

func (typ DataType) BuildArgsForDBQuerierExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForDBQuerierRetrievalMethodTest

func (typ DataType) BuildArgsForDBQuerierRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForDBQuerierTestOfArchiveQueryBuilder

func (typ DataType) BuildArgsForDBQuerierTestOfArchiveQueryBuilder() []jen.Code

func (DataType) BuildArgsForDBQuerierTestOfListRetrievalQueryBuilder

func (typ DataType) BuildArgsForDBQuerierTestOfListRetrievalQueryBuilder(p *Project) []jen.Code

func (DataType) BuildArgsForDBQuerierTestOfUpdateMethod

func (typ DataType) BuildArgsForDBQuerierTestOfUpdateMethod() []jen.Code

func (DataType) BuildArgsForDBQuerierTestOfUpdateQueryBuilder

func (typ DataType) BuildArgsForDBQuerierTestOfUpdateQueryBuilder() []jen.Code

func (DataType) BuildArgsForHTTPClientArchiveMethodTest

func (typ DataType) BuildArgsForHTTPClientArchiveMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientArchiveMethodTestURLFormatCall

func (typ DataType) BuildArgsForHTTPClientArchiveMethodTestURLFormatCall(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientArchiveRequestBuildingMethod

func (typ DataType) BuildArgsForHTTPClientArchiveRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientArchiveRequestBuildingMethodTest

func (typ DataType) BuildArgsForHTTPClientArchiveRequestBuildingMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientCreateRequestBuildingMethod

func (typ DataType) BuildArgsForHTTPClientCreateRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientExistenceMethodTest

func (typ DataType) BuildArgsForHTTPClientExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientExistenceRequestBuildingMethod

func (typ DataType) BuildArgsForHTTPClientExistenceRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientExistenceRequestBuildingMethodTest

func (typ DataType) BuildArgsForHTTPClientExistenceRequestBuildingMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientListRequestMethod

func (typ DataType) BuildArgsForHTTPClientListRequestMethod(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientMethodTest

func (typ DataType) BuildArgsForHTTPClientMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientRetrievalRequestBuilderMethodTest

func (typ DataType) BuildArgsForHTTPClientRetrievalRequestBuilderMethodTest(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientRetrievalRequestBuildingMethod

func (typ DataType) BuildArgsForHTTPClientRetrievalRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildArgsForHTTPClientUpdateRequestBuildingMethod

func (typ DataType) BuildArgsForHTTPClientUpdateRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildArgsForServiceRouteExistenceCheck

func (typ DataType) BuildArgsForServiceRouteExistenceCheck(p *Project) []jen.Code

func (DataType) BuildArgsToUseForDBQuerierCreationQueryBuildingTest

func (typ DataType) BuildArgsToUseForDBQuerierCreationQueryBuildingTest() []jen.Code

func (DataType) BuildCallArgsForDBClientCreationMethodTest

func (typ DataType) BuildCallArgsForDBClientCreationMethodTest() []jen.Code

func (DataType) BuildCallArgsForDBClientListRetrievalMethodTest

func (typ DataType) BuildCallArgsForDBClientListRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildCallArgsForDBClientUpdateMethodTest

func (typ DataType) BuildCallArgsForDBClientUpdateMethodTest() []jen.Code

func (DataType) BuildCallArgsForHTTPClientListRetrievalMethodTest

func (typ DataType) BuildCallArgsForHTTPClientListRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildCallArgsForHTTPClientListRetrievalRequestBuildingMethodTest

func (typ DataType) BuildCallArgsForHTTPClientListRetrievalRequestBuildingMethodTest(p *Project) []jen.Code

func (DataType) BuildCallArgsForHTTPClientUpdateMethodTest

func (typ DataType) BuildCallArgsForHTTPClientUpdateMethodTest(p *Project) []jen.Code

func (DataType) BuildCallArgsForHTTPClientUpdateRequestBuildingMethodTest

func (typ DataType) BuildCallArgsForHTTPClientUpdateRequestBuildingMethodTest(p *Project) []jen.Code

func (DataType) BuildDBClientArchiveMethodCallArgs

func (typ DataType) BuildDBClientArchiveMethodCallArgs() []jen.Code

func (DataType) BuildDBClientArchiveMethodParams

func (typ DataType) BuildDBClientArchiveMethodParams() []jen.Code

func (DataType) BuildDBClientCreationMethodCallArgs

func (typ DataType) BuildDBClientCreationMethodCallArgs() []jen.Code

func (DataType) BuildDBClientCreationMethodParams

func (typ DataType) BuildDBClientCreationMethodParams(p *Project) []jen.Code

func (DataType) BuildDBClientExistenceMethodCallArgs

func (typ DataType) BuildDBClientExistenceMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildDBClientExistenceMethodParams

func (typ DataType) BuildDBClientExistenceMethodParams(p *Project) []jen.Code

func (DataType) BuildDBClientListRetrievalMethodCallArgs

func (typ DataType) BuildDBClientListRetrievalMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildDBClientListRetrievalMethodParams

func (typ DataType) BuildDBClientListRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildDBClientRetrievalMethodCallArgs

func (typ DataType) BuildDBClientRetrievalMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildDBClientRetrievalMethodParams

func (typ DataType) BuildDBClientRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildDBClientUpdateMethodCallArgs

func (typ DataType) BuildDBClientUpdateMethodCallArgs(updatedVarName string) []jen.Code

func (DataType) BuildDBClientUpdateMethodParams

func (typ DataType) BuildDBClientUpdateMethodParams(p *Project, updatedVarName string) []jen.Code

func (DataType) BuildDBQuerierArchiveMethodParams

func (typ DataType) BuildDBQuerierArchiveMethodParams() []jen.Code

func (DataType) BuildDBQuerierArchiveQueryBuildingArgs

func (typ DataType) BuildDBQuerierArchiveQueryBuildingArgs() []jen.Code

func (DataType) BuildDBQuerierArchiveQueryMethodParams

func (typ DataType) BuildDBQuerierArchiveQueryMethodParams() []jen.Code

func (DataType) BuildDBQuerierArchiveSomethingQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierArchiveSomethingQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierArchiveSomethingTestPrerequisiteVariables

func (typ DataType) BuildDBQuerierArchiveSomethingTestPrerequisiteVariables(p *Project) []jen.Code

func (DataType) BuildDBQuerierBuildSomethingExistsQueryTestCallArgs

func (typ DataType) BuildDBQuerierBuildSomethingExistsQueryTestCallArgs(p *Project) []jen.Code

func (DataType) BuildDBQuerierCreateSomethingQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierCreateSomethingQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierCreationMethodArgsToUseFromMethodTest

func (typ DataType) BuildDBQuerierCreationMethodArgsToUseFromMethodTest() []jen.Code

func (DataType) BuildDBQuerierCreationMethodParams

func (typ DataType) BuildDBQuerierCreationMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierCreationMethodQueryBuildingArgs

func (typ DataType) BuildDBQuerierCreationMethodQueryBuildingArgs() []jen.Code

func (DataType) BuildDBQuerierCreationQueryBuildingMethodParams

func (typ DataType) BuildDBQuerierCreationQueryBuildingMethodParams(p *Project, isModelsPackage bool) []jen.Code

func (DataType) BuildDBQuerierExistenceMethodParams

func (typ DataType) BuildDBQuerierExistenceMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierExistenceQueryBuildingArgs

func (typ DataType) BuildDBQuerierExistenceQueryBuildingArgs(p *Project) []jen.Code

func (DataType) BuildDBQuerierExistenceQueryMethodConditionalClauses

func (typ DataType) BuildDBQuerierExistenceQueryMethodConditionalClauses(p *Project) []jen.Code

func (DataType) BuildDBQuerierExistenceQueryMethodParams

func (typ DataType) BuildDBQuerierExistenceQueryMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierExistenceQueryMethodQueryBuildingWhereClause

func (typ DataType) BuildDBQuerierExistenceQueryMethodQueryBuildingWhereClause(p *Project) squirrel.Eq

func (DataType) BuildDBQuerierGetListOfSomethingQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierGetListOfSomethingQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierGetSomethingQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierGetSomethingQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierListRetrievalMethodArgs

func (typ DataType) BuildDBQuerierListRetrievalMethodArgs(p *Project) []jen.Code

func (DataType) BuildDBQuerierListRetrievalMethodParams

func (typ DataType) BuildDBQuerierListRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierListRetrievalQueryBuildingMethodParams

func (typ DataType) BuildDBQuerierListRetrievalQueryBuildingMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierListRetrievalQueryMethodConditionalClauses

func (typ DataType) BuildDBQuerierListRetrievalQueryMethodConditionalClauses(p *Project) []jen.Code

func (DataType) BuildDBQuerierListRetrievalQueryMethodQueryBuildingWhereClause

func (typ DataType) BuildDBQuerierListRetrievalQueryMethodQueryBuildingWhereClause(p *Project) squirrel.Eq

func (DataType) BuildDBQuerierRetrievalMethodParams

func (typ DataType) BuildDBQuerierRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierRetrievalQueryBuildingArgs

func (typ DataType) BuildDBQuerierRetrievalQueryBuildingArgs(p *Project) []jen.Code

func (DataType) BuildDBQuerierRetrievalQueryMethodConditionalClauses

func (typ DataType) BuildDBQuerierRetrievalQueryMethodConditionalClauses(p *Project) []jen.Code

func (DataType) BuildDBQuerierRetrievalQueryMethodParams

func (typ DataType) BuildDBQuerierRetrievalQueryMethodParams(p *Project) []jen.Code

func (DataType) BuildDBQuerierRetrievalQueryMethodQueryBuildingWhereClause

func (typ DataType) BuildDBQuerierRetrievalQueryMethodQueryBuildingWhereClause(p *Project) squirrel.Eq

func (DataType) BuildDBQuerierRetrievalQueryTestCallArgs

func (typ DataType) BuildDBQuerierRetrievalQueryTestCallArgs(p *Project) []jen.Code

func (DataType) BuildDBQuerierSomethingExistsQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierSomethingExistsQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierUpdateMethodArgs

func (typ DataType) BuildDBQuerierUpdateMethodArgs(updatedVarName string) []jen.Code

func (DataType) BuildDBQuerierUpdateMethodParams

func (typ DataType) BuildDBQuerierUpdateMethodParams(p *Project, updatedVarName string) []jen.Code

func (DataType) BuildDBQuerierUpdateQueryBuildingMethodParams

func (typ DataType) BuildDBQuerierUpdateQueryBuildingMethodParams(p *Project, updatedVarName string) []jen.Code

func (DataType) BuildDBQuerierUpdateSomethingQueryBuilderTestPreQueryLines

func (typ DataType) BuildDBQuerierUpdateSomethingQueryBuilderTestPreQueryLines(p *Project) []jen.Code

func (DataType) BuildDBQuerierUpdateSomethingTestPrerequisiteVariables

func (typ DataType) BuildDBQuerierUpdateSomethingTestPrerequisiteVariables(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForDBQueriersCreationMethodTest

func (typ DataType) BuildDependentObjectsForDBQueriersCreationMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForDBQueriersExistenceMethodTest

func (typ DataType) BuildDependentObjectsForDBQueriersExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientArchiveMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientArchiveMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildArchiveRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildArchiveRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildCreationRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildCreationRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildExistenceRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildExistenceRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildListRetrievalRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildListRetrievalRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildRetrievalRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildRetrievalRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientBuildUpdateRequestMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientBuildUpdateRequestMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientCreationMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientCreationMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientExistenceMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientListRetrievalTest

func (typ DataType) BuildDependentObjectsForHTTPClientListRetrievalTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientRetrievalMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildDependentObjectsForHTTPClientUpdateMethodTest

func (typ DataType) BuildDependentObjectsForHTTPClientUpdateMethodTest(p *Project) []jen.Code

func (DataType) BuildExpectedQueryArgsForDBQueriersListRetrievalMethodTest

func (typ DataType) BuildExpectedQueryArgsForDBQueriersListRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildFormatCallArgsForHTTPClientCreationMethodTest

func (typ DataType) BuildFormatCallArgsForHTTPClientCreationMethodTest(p *Project) (args []jen.Code)

func (DataType) BuildFormatCallArgsForHTTPClientExistenceMethodTest

func (typ DataType) BuildFormatCallArgsForHTTPClientExistenceMethodTest(p *Project) (args []jen.Code)

func (DataType) BuildFormatCallArgsForHTTPClientListMethodTest

func (typ DataType) BuildFormatCallArgsForHTTPClientListMethodTest(p *Project) (args []jen.Code)

func (DataType) BuildFormatCallArgsForHTTPClientRetrievalMethodTest

func (typ DataType) BuildFormatCallArgsForHTTPClientRetrievalMethodTest(p *Project) (args []jen.Code)

func (DataType) BuildFormatCallArgsForHTTPClientUpdateTest

func (typ DataType) BuildFormatCallArgsForHTTPClientUpdateTest(p *Project) (args []jen.Code)

func (DataType) BuildFormatStringForHTTPClientArchiveMethodTest

func (typ DataType) BuildFormatStringForHTTPClientArchiveMethodTest(p *Project) (path string)

func (DataType) BuildFormatStringForHTTPClientCreateMethodTest

func (typ DataType) BuildFormatStringForHTTPClientCreateMethodTest(p *Project) (path string)

func (DataType) BuildFormatStringForHTTPClientExistenceMethodTest

func (typ DataType) BuildFormatStringForHTTPClientExistenceMethodTest(p *Project) (path string)

func (DataType) BuildFormatStringForHTTPClientListMethodTest

func (typ DataType) BuildFormatStringForHTTPClientListMethodTest(p *Project) (path string)

func (DataType) BuildFormatStringForHTTPClientRetrievalMethodTest

func (typ DataType) BuildFormatStringForHTTPClientRetrievalMethodTest(p *Project) (path string)

func (DataType) BuildFormatStringForHTTPClientSearchMethodTest

func (typ DataType) BuildFormatStringForHTTPClientSearchMethodTest() (path string)

func (DataType) BuildFormatStringForHTTPClientUpdateMethodTest

func (typ DataType) BuildFormatStringForHTTPClientUpdateMethodTest(p *Project) (path string)

func (DataType) BuildGetListOfSomethingFromIDsArgs

func (typ DataType) BuildGetListOfSomethingFromIDsArgs(p *Project) []jen.Code

func (DataType) BuildGetListOfSomethingFromIDsArgsForTest

func (typ DataType) BuildGetListOfSomethingFromIDsArgsForTest(p *Project) []jen.Code

func (DataType) BuildGetListOfSomethingFromIDsParams

func (typ DataType) BuildGetListOfSomethingFromIDsParams(p *Project) []jen.Code

func (DataType) BuildGetListOfSomethingLogValues

func (typ DataType) BuildGetListOfSomethingLogValues(p *Project) *jen.Statement

func (DataType) BuildGetSomethingLogValues

func (typ DataType) BuildGetSomethingLogValues(p *Project) jen.Code

func (DataType) BuildHTTPClientCreationMethodArgsForTest

func (typ DataType) BuildHTTPClientCreationMethodArgsForTest(p *Project) []jen.Code

func (DataType) BuildHTTPClientCreationRequestBuildingMethodArgsForTest

func (typ DataType) BuildHTTPClientCreationRequestBuildingMethodArgsForTest(p *Project) []jen.Code

func (DataType) BuildHTTPClientRetrievalMethodTestDependentObjects

func (typ DataType) BuildHTTPClientRetrievalMethodTestDependentObjects(p *Project) []jen.Code

func (DataType) BuildHTTPClientRetrievalTestCallArgs

func (typ DataType) BuildHTTPClientRetrievalTestCallArgs(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionArchiveMethodCallArgs

func (typ DataType) BuildInterfaceDefinitionArchiveMethodCallArgs() []jen.Code

func (DataType) BuildInterfaceDefinitionArchiveMethodParams

func (typ DataType) BuildInterfaceDefinitionArchiveMethodParams() []jen.Code

func (DataType) BuildInterfaceDefinitionCreationMethodParams

func (typ DataType) BuildInterfaceDefinitionCreationMethodParams(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionExistenceMethodCallArgs

func (typ DataType) BuildInterfaceDefinitionExistenceMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionExistenceMethodParams

func (typ DataType) BuildInterfaceDefinitionExistenceMethodParams(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionListRetrievalMethodParams

func (typ DataType) BuildInterfaceDefinitionListRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionRetrievalMethodCallArgs

func (typ DataType) BuildInterfaceDefinitionRetrievalMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionRetrievalMethodParams

func (typ DataType) BuildInterfaceDefinitionRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildInterfaceDefinitionUpdateMethodParams

func (typ DataType) BuildInterfaceDefinitionUpdateMethodParams(p *Project, updatedVarName string) []jen.Code

func (DataType) BuildMockDataManagerListRetrievalMethodCallArgs

func (typ DataType) BuildMockDataManagerListRetrievalMethodCallArgs(p *Project) []jen.Code

func (DataType) BuildMockDataManagerListRetrievalMethodParams

func (typ DataType) BuildMockDataManagerListRetrievalMethodParams(p *Project) []jen.Code

func (DataType) BuildMockDataManagerUpdateMethodCallArgs

func (typ DataType) BuildMockDataManagerUpdateMethodCallArgs(updatedVarName string) []jen.Code

func (DataType) BuildMockDataManagerUpdateMethodParams

func (typ DataType) BuildMockDataManagerUpdateMethodParams(p *Project, updatedVarName string) []jen.Code

func (DataType) BuildMockInterfaceDefinitionCreationMethodCallArgs

func (typ DataType) BuildMockInterfaceDefinitionCreationMethodCallArgs() []jen.Code

func (DataType) BuildMockInterfaceDefinitionCreationMethodParams

func (typ DataType) BuildMockInterfaceDefinitionCreationMethodParams(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientArchiveMethod

func (typ DataType) BuildParamsForHTTPClientArchiveMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientArchiveRequestBuildingMethod

func (typ DataType) BuildParamsForHTTPClientArchiveRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientCreateMethod

func (typ DataType) BuildParamsForHTTPClientCreateMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientCreateRequestBuildingMethod

func (typ DataType) BuildParamsForHTTPClientCreateRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientExistenceMethod

func (typ DataType) BuildParamsForHTTPClientExistenceMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientExistenceRequestBuildingMethod

func (typ DataType) BuildParamsForHTTPClientExistenceRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientListRequestMethod

func (typ DataType) BuildParamsForHTTPClientListRequestMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientMethodThatFetchesAList

func (typ DataType) BuildParamsForHTTPClientMethodThatFetchesAList(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientRetrievalMethod

func (typ DataType) BuildParamsForHTTPClientRetrievalMethod(p *Project, call bool) []jen.Code

func (DataType) BuildParamsForHTTPClientRetrievalRequestBuildingMethod

func (typ DataType) BuildParamsForHTTPClientRetrievalRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientUpdateMethod

func (typ DataType) BuildParamsForHTTPClientUpdateMethod(p *Project) []jen.Code

func (DataType) BuildParamsForHTTPClientUpdateRequestBuildingMethod

func (typ DataType) BuildParamsForHTTPClientUpdateRequestBuildingMethod(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForDBClientArchiveMethodTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForDBClientArchiveMethodTest() []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForDBClientExistenceMethodTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForDBClientExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForDBClientRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForDBClientRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForDBQueriersArchiveMethodTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForDBQueriersArchiveMethodTest() []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForDBQueriersListRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForDBQueriersListRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForServiceArchiveHandlerTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForServiceArchiveHandlerTest() []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForServiceCreateHandlerTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForServiceCreateHandlerTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForServiceExistenceHandlerTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForServiceExistenceHandlerTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForServiceReadHandlerTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForServiceReadHandlerTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarCallArgsForServiceUpdateHandlerTest

func (typ DataType) BuildRequisiteFakeVarCallArgsForServiceUpdateHandlerTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarDecsForDBQuerierRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarDecsForDBQuerierRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBClientArchiveMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBClientArchiveMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBClientCreateMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBClientCreateMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBClientExistenceMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBClientExistenceMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBClientListRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBClientListRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBClientRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBClientRetrievalMethodTest(p *Project) []jen.Code

func (DataType) BuildRequisiteFakeVarsForDBQuerierListRetrievalMethodTest

func (typ DataType) BuildRequisiteFakeVarsForDBQuerierListRetrievalMethodTest(p *Project, includeFilter bool) []jen.Code

func (DataType) BuildRequisiteVarsForDBClientUpdateMethodTest

func (typ DataType) BuildRequisiteVarsForDBClientUpdateMethodTest(p *Project) []jen.Code

func (DataType) ModifyQueryBuilderWithJoinClauses

func (typ DataType) ModifyQueryBuilderWithJoinClauses(p *Project, qb squirrel.SelectBuilder) squirrel.SelectBuilder

func (DataType) ModifyQueryBuildingStatementWithJoinClauses

func (typ DataType) ModifyQueryBuildingStatementWithJoinClauses(p *Project, qbStmt *jen.Statement) *jen.Statement

func (DataType) MultipleOwnersBelongingToUser

func (typ DataType) MultipleOwnersBelongingToUser(p *Project) bool

func (DataType) OwnedByAUserAtSomeLevel

func (typ DataType) OwnedByAUserAtSomeLevel(p *Project) bool

func (DataType) RestrictedToUserAtSomeLevel

func (typ DataType) RestrictedToUserAtSomeLevel(p *Project) bool

type Project

type Project struct {
	OutputPath                string
	OutputPathStringToReplace string
	OutputPathSubstitution    string

	EnableNewsman bool

	Name      wordsmith.SuperPalabra
	DataTypes []DataType
	// contains filtered or unexported fields
}

func CompleteSurvey

func CompleteSurvey(
	projectName,
	sourceModels,
	outputPackage string,
	postgresEnabled,
	sqliteEnabled,
	mariaDBEnabled bool,
) (*Project, error)

CompleteSurvey asks the user questions to determine core project information

func (*Project) DatabaseIsEnabled

func (p *Project) DatabaseIsEnabled(database validDatabase) bool

func (*Project) DatabaseV1Package

func (p *Project) DatabaseV1Package(parts ...string) string

func (*Project) DisableDatabase

func (p *Project) DisableDatabase(database validDatabase)

func (*Project) EnableDatabase

func (p *Project) EnableDatabase(database validDatabase)

func (*Project) EnabledDatabases

func (p *Project) EnabledDatabases() []string

func (*Project) EnumerationPresent

func (p *Project) EnumerationPresent() bool

EnumerationPresent returns true if any of the datatypes are enumerations

func (*Project) FakeModelsPackage

func (p *Project) FakeModelsPackage(parts ...string) string

func (*Project) FindDependentsOfType

func (p *Project) FindDependentsOfType(parentType DataType) []DataType

func (*Project) FindOwnerTypeChain

func (p *Project) FindOwnerTypeChain(typ DataType) []DataType

FindOwnerTypeChain returns the owner chain of a given object from highest ancestor to lowest so if C belongs to B belongs to A, then calling `FindOwnerTypeChain` for C would yield [A, B]

func (*Project) FindOwnerTypeChainWithoutReversing

func (p *Project) FindOwnerTypeChainWithoutReversing(typ DataType) []DataType

FindOwnerTypeChain returns the owner chain of a given object from highest ancestor to lowest so if C belongs to B belongs to A, then calling `FindOwnerTypeChain` for C would yield [A, B]

func (*Project) FindType

func (p *Project) FindType(name string) *DataType

func (*Project) HTTPClientV1Package

func (p *Project) HTTPClientV1Package(parts ...string) string

func (*Project) InternalAuthV1Package

func (p *Project) InternalAuthV1Package(parts ...string) string

func (*Project) InternalConfigV1Package

func (p *Project) InternalConfigV1Package(parts ...string) string

func (*Project) InternalEncodingV1Package

func (p *Project) InternalEncodingV1Package(parts ...string) string

func (*Project) InternalMetricsV1Package

func (p *Project) InternalMetricsV1Package(parts ...string) string

func (*Project) InternalSearchV1Package

func (p *Project) InternalSearchV1Package(parts ...string) string

func (*Project) InternalTracingV1Package

func (p *Project) InternalTracingV1Package(parts ...string) string

func (*Project) InternalV1Package

func (p *Project) InternalV1Package(parts ...string) string

func (*Project) LastDataType

func (p *Project) LastDataType() DataType

LastDataType is a helper method for tests

func (*Project) ModelsV1Package

func (p *Project) ModelsV1Package(parts ...string) string

func (*Project) ParseModels

func (p *Project) ParseModels() error

func (*Project) RelativePath

func (p *Project) RelativePath(parts ...string) string

func (*Project) SearchEnabled

func (p *Project) SearchEnabled() bool

SearchEnabled returns true if any of the datatypes have search enabled

func (*Project) ServiceV1AuthPackage

func (p *Project) ServiceV1AuthPackage(parts ...string) string

func (*Project) ServiceV1FrontendPackage

func (p *Project) ServiceV1FrontendPackage(parts ...string) string

func (*Project) ServiceV1OAuth2ClientsPackage

func (p *Project) ServiceV1OAuth2ClientsPackage(parts ...string) string

func (*Project) ServiceV1Package

func (p *Project) ServiceV1Package(parts ...string) string

func (*Project) ServiceV1UsersPackage

func (p *Project) ServiceV1UsersPackage(parts ...string) string

func (*Project) ServiceV1WebhooksPackage

func (p *Project) ServiceV1WebhooksPackage(parts ...string) string

func (*Project) TestUtilV1Package

func (p *Project) TestUtilV1Package(parts ...string) string

func (*Project) Validate

func (p *Project) Validate()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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