gogrpcserver

package
v0.0.0-...-0e43621 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const APIPath = "/api/v1"
View Source
const ClientFile = "client.go.tmpl"
View Source
const ConfigFile = "grpc-opentel-config.go.tmpl"
View Source
const ConfigPath = "/config"
View Source
const ControllersPath = GrpcServerPath + "/controllers"
View Source
const DaoFile = "dao.go.tmpl"
View Source
const DaosPath = GrpcServerPath + "/daos"
View Source
const GrpcClientPath = "/pkg/grpc/client"
View Source
const GrpcServerPath = "/pkg/grpc/server"
View Source
const Map = "Map"
View Source
const MapDBConfigFile = "map.go.tmpl"
View Source
const ModelsPath = GrpcServerPath + "/models"
View Source
const MongoDB = "MongoDB"

MongoDB nosql databases

View Source
const MongoDBConfigFile = "mongodb.go.tmpl"
View Source
const MongoDBDaoFile = "mongodb-dao.go.tmpl"
View Source
const MySQL = "MySQL"
View Source
const MySQLDBConfigFile = "mysql.go.tmpl"
View Source
const MySQLDaoFile = "mysql-dao.go.tmpl"
View Source
const MySQLGORM = "MySQL-GORM"
View Source
const MySQLGORMDBConfigFile = "mysql-gorm.go.tmpl"
View Source
const MySQLGORMDaoFile = "mysql-gorm-dao.go.tmpl"
View Source
const NoSQLAPIProtoFile = "nosqls-api.proto.tmpl"
View Source
const NoSQLControllerFile = "nosqls-controller.go.tmpl"
View Source
const NoSQLDBClientsPath = DaosPath + "/clients/nosqls"
View Source
const NoSQLModelFile = "nosqls-model.go.tmpl"
View Source
const NoSQLServiceFile = "nosqls-service.go.tmpl"
View Source
const SQLAPIProtoFile = "sqls-api.proto.tmpl"
View Source
const SQLControllerFile = "sqls-controller.go.tmpl"
View Source
const SQLDBClientsPath = DaosPath + "/clients/sqls"
View Source
const SQLGORMModelFile = "sqls-gorm-model.go.tmpl"

SQLGORMModelFile GORM integration

View Source
const SQLModelFile = "sqls-model.go.tmpl"
View Source
const SQLServiceFile = "sqls-service.go.tmpl"
View Source
const SQLite = "SQLite"

SQLite sql databases

View Source
const SQLiteGORM = "SQLite-GORM"

SQLiteGORM - GORM sql databases

View Source
const SQLiteGORMDBConfigFile = "sqlite-gorm.go.tmpl"
View Source
const SQLiteGORMDaoFile = "sqlite-gorm-dao.go.tmpl"
View Source
const ServicesPath = GrpcServerPath + "/services"
View Source
const SqliteDBConfigFile = "sqlite.go.tmpl"
View Source
const SqliteDaoFile = "sqlite-dao.go.tmpl"

Variables

This section is empty.

Functions

This section is empty.

Types

type Copier

type Copier struct {
	NodeDirectoryName string
	TemplatesRootPath string
	Data              map[string]interface{}
	IsGrpcServer      bool
	HasGrpcClients    bool
	SQLDB             string
	NoSQLDB           string
	IsNoSQLDB         bool
	IsSQLDB           bool
	GrpcServerPort    string
	Resources         []*corenode.Resource
	GrpcClients       []*corenode.GrpcClient
	PluralizeClient   *pluralize.Client
}

Copier Language specific *Copier

func NewCopier

func NewCopier(gitPlatformURL, gitPlatformUserName, gitRepositoryName, nodeName, nodeDirectoryName, templatesRootPath string, isGrpcServer bool, grpcServerPort string, isSQLDB bool, sqlDB string, isNoSQLDB bool, noSQLDB string, resources []*corenode.Resource, grpcClients []*corenode.GrpcClient) *Copier

func (*Copier) CopyGrpcClientResourceFiles

func (c *Copier) CopyGrpcClientResourceFiles(grpcClient *corenode.GrpcClient) error

CopyGrpcClientResourceFiles copies grpc client files from template and renames them as per client config.

func (*Copier) CreateGrpcClients

func (c *Copier) CreateGrpcClients() error

CreateGrpcClients creates/copies relevant files to generated project

func (*Copier) CreateGrpcConfigs

func (c *Copier) CreateGrpcConfigs() error

CreateGrpcConfigs creates/copies relevant files to generated project

func (*Copier) CreateGrpcServer

func (c *Copier) CreateGrpcServer() error

CreateGrpcServer creates/copies relevant files to generated project

func (*Copier) CreateRootLevelFiles

func (c *Copier) CreateRootLevelFiles() error

CreateRootLevelFiles copies all root level files at language template.

Jump to

Keyboard shortcuts

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