utilities

package
v0.0.0-...-40d9b39 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Environment string
	Region      string
	Resource    string
	Secret      string
	// contains filtered or unexported fields
}

func (*Client) Close

func (client *Client) Close()

func (*Client) Delete

func (client *Client) Delete(obj SQLInterface, tableType string)

func (*Client) Fetch

func (client *Client) Fetch(obj SQLInterface, tableType string, id int64)

func (*Client) FetchAll

func (client *Client) FetchAll(asInterface interface{}, tableType string, whereClause string, whereValues ...interface{})

func (*Client) FetchMany

func (client *Client) FetchMany(asInterface interface{}, parentId int64, parentTableName string, childTableName string, valueName string, childType string, reverseAccess bool)

func (*Client) Open

func (client *Client) Open()

func (*Client) Save

func (client *Client) Save(obj SQLInterface, tableType string)

func (*Client) SaveAll

func (client *Client) SaveAll(asInterface interface{}, tableType string)

func (*Client) Update

func (client *Client) Update(obj SQLInterface, tableType string)

type ClientInterface

type ClientInterface interface {
	Open()
	Close()
	Fetch(obj SQLInterface, tableType string, id int64)
	FetchAll(asInterface interface{}, tableType string, whereClause string, whereValues ...interface{})
	FetchMany(asInterface interface{}, parentId int64, parentTableName string, childTableName string, valueName string, childType string, reverseAccess bool)
	Save(obj SQLInterface, tableType string)
	SaveAll(asInterface interface{}, tableType string)
	Update(obj SQLInterface, tableType string)
}

type ClientMock

type ClientMock struct {
	Environment string
	Region      string
	Resource    string
	Secret      string
	// contains filtered or unexported fields
}

func (*ClientMock) AddTable_

func (client *ClientMock) AddTable_(tablename string)

func (*ClientMock) Close

func (client *ClientMock) Close()

func (*ClientMock) Delete

func (client *ClientMock) Delete(obj SQLInterface, tableType string)

func (*ClientMock) Fetch

func (client *ClientMock) Fetch(obj SQLInterface, tableType string, id int64)

func (*ClientMock) FetchAll

func (client *ClientMock) FetchAll(asInterface interface{}, tableType string, whereClause string, whereValues ...interface{})

func (*ClientMock) FetchMany

func (client *ClientMock) FetchMany(asInterface interface{}, parentId int64, parentTableName string, childTableName string, valueName string, childType string, reverseAccess bool)

func (*ClientMock) Open

func (client *ClientMock) Open()

func (*ClientMock) Print

func (client *ClientMock) Print(tablename string)

func (*ClientMock) Save

func (client *ClientMock) Save(obj SQLInterface, tableType string)

func (*ClientMock) SaveAll

func (client *ClientMock) SaveAll(asInterface interface{}, tableType string)

func (*ClientMock) Update

func (client *ClientMock) Update(obj SQLInterface, tableType string)

type Job

type Job struct {
	Id              int64          `sql:"id"`
	PercentComplete int            `sql:"percent_complete"`
	Error           sql.NullString `sql:"error"`
	AssetId         sql.NullInt64  `sql:"asset_id"`
	// contains filtered or unexported fields
}

func CreateJob

func CreateJob(id int64, totalSteps int) *Job

func (*Job) Complete

func (job *Job) Complete(client ClientInterface, assetId int64)

func (*Job) GetId

func (job *Job) GetId() *int64

func (*Job) Panic

func (job *Job) Panic(client ClientInterface, msg string)

func (*Job) Step

func (job *Job) Step(client ClientInterface)

func (*Job) TableName

func (job *Job) TableName(rollType string) string

type SQLInterface

type SQLInterface interface {
	GetId() *int64
	TableName(string) string
}
type SectorToSystemLink struct {
	Id       int64 `sql:"id"`
	ParentId int64 `sql:"asset_sector_id"`
	ChildId  int64 `sql:"asset_system_id"`
}

func (*SectorToSystemLink) GetId

func (link *SectorToSystemLink) GetId() *int64

func (*SectorToSystemLink) TableName

func (link *SectorToSystemLink) TableName(linkType string) string
type StarClusterToDetailLink struct {
	Id       int64 `sql:"id"`
	ParentId int64 `sql:"asset_star_cluster_id"`
	ChildId  int64 `sql:"detail_id"`
}

func (*StarClusterToDetailLink) GetId

func (link *StarClusterToDetailLink) GetId() *int64

func (*StarClusterToDetailLink) TableName

func (link *StarClusterToDetailLink) TableName(linkType string) string
type SystemToDetailLink struct {
	Id       int64 `sql:"id"`
	ParentId int64 `sql:"asset_system_id"`
	ChildId  int64 `sql:"detail_id"`
}

func (*SystemToDetailLink) GetId

func (link *SystemToDetailLink) GetId() *int64

func (*SystemToDetailLink) TableName

func (link *SystemToDetailLink) TableName(linkType string) string
type SystemToStarClusterLink struct {
	Id       int64 `sql:"id"`
	ParentId int64 `sql:"asset_system_id"`
	ChildId  int64 `sql:"asset_star_cluster_id"`
}

func (*SystemToStarClusterLink) GetId

func (link *SystemToStarClusterLink) GetId() *int64

func (*SystemToStarClusterLink) TableName

func (link *SystemToStarClusterLink) TableName(linkType string) string

Jump to

Keyboard shortcuts

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