ysg

package
v0.0.0-...-7a30d57 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	// Name название, например `id`
	Name string
	// TableName название таблицы, например `users`
	TableName string
}

func (Column) GoNamePrivate

func (c Column) GoNamePrivate() string

func (Column) GoNamePublic

func (c Column) GoNamePublic() string

type Schema

type Schema struct {
	// Service название сервиса, например `users`
	Service string
	// Tables таблицы
	Tables []Table
}

type Service

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

Service сервис

func NewService

func NewService(ydbConn *ydb.Driver) *Service

NewService создает новый сервис

func (*Service) Generate

func (s *Service) Generate(ctx context.Context, service string) ([]byte, error)

Generate генерирует код для сервиса

type Table

type Table struct {
	// Service название сервиса, например `users`
	Service string
	// Name название, например `users`
	Name string
	// Columns колонки
	Columns []Column
}

func (Table) ColumnsString

func (t Table) ColumnsString() string

func (Table) GoNamePrivate

func (t Table) GoNamePrivate() string

func (Table) GoNamePublic

func (t Table) GoNamePublic() string

Jump to

Keyboard shortcuts

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