mng2dbgate

package
v0.0.0-...-763d59e Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteQuery

func ExecuteQuery(conn *grpc.ClientConn, query string) (string, error)

(conn)にクエリリクエストを送る

Types

type Client

type Client struct{}

func (Client) Count

func (c Client) Count(key string, id string, bucket string) (int32, error)

DBGから key=id で登録されたdata数を取得する

func (Client) DeleteShares

func (c Client) DeleteShares(dataIDs []string) error

DBGにシェア削除リクエストを送る

func (Client) GetComputationResult

func (c Client) GetComputationResult(jobUUID string) ([]*ComputationResult, error)

DBGから計算結果を得る

func (Client) GetDataList

func (c Client) GetDataList() (string, error)

func (Client) GetSchema

func (c Client) GetSchema(dataID string) ([]string, error)

DBGからschemaを得る

func (Client) InsertModelParams

func (c Client) InsertModelParams(jobUUID string, params string, pieceId int32) error

DBGにモデルパラメータを送信する

func (Client) InsertShares

func (c Client) InsertShares(dataID string, schema []string, pieceID int32, shares string, sent_at string) error

DBGにシェアを送信する

type ComputationResult

type ComputationResult struct {
	ID      string     `json:"id"`
	JobUUID string     `json:"job_uuid"`
	Status  int32      `json:"status"`
	Result  string     `json:"result"`
	Meta    MetaResult `json:"meta"`
}

type DataIdResponse

type DataIdResponse struct {
	DataID string `json:"data_id"`
}

type GetDataListResult

type GetDataListResult struct {
	DataID string `json:"data_id"`
	SentAt string `json:"sent_at"`
}

type M2DbClient

type M2DbClient interface {
	InsertShares(string, []string, int32, string, string) error
	DeleteShares([]string) error
	GetSchema(string) ([]string, error)
	GetComputationResult(string) ([]*ComputationResult, error)
	InsertModelParams(string, string, int32) error
	GetDataList() (string, error)
}

type Meta

type Meta struct {
	Schema  []string `json:"schema"`
	PieceID int32    `json:"piece_id"`
}

type MetaResponse

type MetaResponse struct {
	ID   string `json:"id"`
	Meta Meta   `json:"meta"`
}

type MetaResult

type MetaResult struct {
	PieceID int32 `json:"piece_id"`
}

type Share

type Share struct {
	DataID string      `json:"data_id"`
	Meta   Meta        `json:"meta"`
	Value  interface{} `json:"value"`
	SentAt string      `json:"sent_at"`
}

Jump to

Keyboard shortcuts

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