server

package
v0.0.0-...-2a83efa Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConfigFileEnv default environment name to search configuration file at
	DefaultConfigFileEnv = "SERVER_CONFIG"
	// InstallationDirName directory name of product installation location
	InstallationDirName = "."
	// ServiceName servoce name of product
	ServiceName = "clutronapi"
)
View Source
const INSTALLDIR = "INSTALLDIR"

INSTALLDIR installation directory environment

Variables

View Source
var AddLocation func(name, location string) error

AddLocation add location, only needed in active server

View Source
var InitAdmin func(*RestServer)

InitAdmin init Adabas admin function, only need in active server

View Source
var InitDirectAccess func(*RestServer)

InitDirectAccess init Adabas direct access function, only need in active server

Functions

func AdaptConfig

func AdaptConfig(config string)

AdaptConfig adapt and reload xml configuration file

func CloseTable

func CloseTable(id common.RegDbID)

CloseTable close table id

func ConnectTable

func ConnectTable(ctx *clu.Context, table string) (common.RegDbID, error)

ConnectTable connect table id

func ConvertByteArrayToString

func ConvertByteArrayToString(name []byte, max int) string

ConvertByteArrayToString convert byte array to string by evaluating \0 end and create string from sub array

func DefaultPIDFile

func DefaultPIDFile() string

DefaultPIDFile default PID file location

func GenerateJWToken

func GenerateJWToken(ctx context.Context) (interface{}, error)

GenerateJWToken generate JWT token on context

func GenerateShutdownHash

func GenerateShutdownHash() string

GenerateShutdownHash generates shutdown hash dependent on pass code time

func GetAdaDataDir

func GetAdaDataDir() string

GetAdaDataDir get ADADATADIR configuration

func GetAllViews

func GetAllViews() []string

GetAllViews get all table and view names

func GetInstallation

func GetInstallation() []string

GetInstallation get defined installations

func Handles

func Handles(dm *Database) (*common.Reference, error)

Handles handle database

func InitConfig

func InitConfig(watch bool) error

InitConfig load xml configuration file The components are used to load and inject the configuration

func InitDatabaseStores

func InitDatabaseStores() error

InitDatabaseStores init database session store

func InitDatabases

func InitDatabases()

InitDatabases initialize database reference IDs

func LoadConfig

func LoadConfig(watch bool, loaderInterface services.ConfigInterface) error

LoadConfig load xml configuration file The components are used to load and inject the configuration

func LoadMessages

func LoadMessages()

LoadMessages load all REST server embed message templates

func LoadedConfig

func LoadedConfig()

LoadedConfig triggered by configuration load

func NewAPIError

func NewAPIError(code string, err error) *api.Error

NewAPIError new API error

func NewStreamRead

func NewStreamRead(table, field, mimetypeField string) *streamRead

NewStreamRead new stream read instance

func RegisterConfigUpdates

func RegisterConfigUpdates(f func())

RegisterConfigUpdates register configuration trigger function

func RegisterExtend

func RegisterExtend(extend RestExtend)

func RemoteHost

func RemoteHost(r *http.Request) string

RemoteHost check if X-Forwarded-For is available and use this remote host

func SearchTable

func SearchTable(table string) (*common.Reference, error)

SearchTable search table ref ID

func StoreConfig

func StoreConfig() error

StoreConfig store the current config, wraps the REST server configuration and uses components to store the current configuration

Types

type Admin

type Admin struct {
	Role           string `yaml:"role,omitempty"`
	UseRole        bool   `yaml:"use_role,omitempty"`
	NoModification bool   `yaml:"NoModification,omitempty"`
}

Admin suite installation

type CommonConfig

type CommonConfig struct {
	Version             string `yaml:"version"`
	ConfigWatcher       bool   `yaml:"configWatcher,omitempty"`
	MaxBinaryBufferSize int    `yaml:"maxBinaryBufferSize,omitempty"`
	StatisticTimer      bool   `yaml:"statisticTimer,omitempty"`
	AppURL              string `yaml:"AppURL,omitempty"`
}

CommonConfig server config base

type Database

type Database struct {
	Driver string `yaml:"driver"`
	// URL      string `yaml:"url,omitempty"`
	Host     string `yaml:"host,omitempty"`
	Port     string `yaml:"port,omitempty"`
	User     string `yaml:"user,omitempty"`
	Password string `yaml:"password,omitempty"`
	Database string `yaml:"database,omitempty"`
	Table    string `yaml:"table,omitempty"`
	Enabled  bool   `yaml:"enabled,omitempty"`
}

Database database

func (*Database) String

func (db *Database) String() string

String representation of Database instance

type DatabaseAccess

type DatabaseAccess struct {
	Global   bool       `yaml:"global,omitempty"`
	Database []Database `yaml:"Database,omitempty"`
}

DatabaseAccess database access

type DatabaseConfig

type DatabaseConfig struct {
	Mapping         Mapping        `yaml:"modelling"`
	DatabaseAccess  DatabaseAccess `yaml:"access"`
	SessionInfo     *Database      `yaml:"sessionInfo"`
	UserInfo        *Database      `yaml:"userInfo"`
	BatchRepository *Database      `yaml:"batchRepository"`
}

DatabaseConfig database modelling and access

type DatabaseMap

type DatabaseMap struct {
	Name        string `yaml:"Name"`
	SrcDatabase string `yaml:"Database"`
	SQL         string `yaml:"SQL"`
	SrcTable    string `yaml:"SourceTable"`
	SrcField    string `yaml:"SourceField"`
	DestTable   string `yaml:"DestinationTable"`
	DestField   string `yaml:"DestinationField"`
}

DatabaseMap database modelling configuration

type Directory

type Directory struct {
	Name     string `yaml:"name"`
	Location string `yaml:"location"`
}

Directory directory entries

type ErrorType

type ErrorType byte

ErrorType web request return type

const (
	// Ok web response Ok
	Ok ErrorType = iota
	// BadRequest web response bad request
	BadRequest
)

type FileTransferConfig

type FileTransferConfig struct {
	Admin       Admin `yaml:"Admin"`
	Directories struct {
		Role      string      `yaml:"role,omitempty"`
		UseRole   bool        `yaml:"use_role,omitempty"`
		Directory []Directory `yaml:"directory"`
	} `yaml:"directories"`
}

FileTransferConfig file transfer config

type Handler

type Handler struct {
}

Handler server handler to ogen API

func (Handler) Access

func (Handler) Access(ctx context.Context, params api.AccessParams) (r api.AccessRes, _ error)

Access implements access operation.

Retrieve the list of users who are allowed to access data.

GET /admin/access/{role}

func (Handler) AdaptPermission

func (Handler) AdaptPermission(ctx context.Context, params api.AdaptPermissionParams) (r api.AdaptPermissionRes, _ error)

AdaptPermission implements adaptPermission operation.

Add RBAC role.

PUT /admin/database/{table}/permission

func (Handler) AddAccess

func (Handler) AddAccess(ctx context.Context, params api.AddAccessParams) (r api.AddAccessRes, _ error)

AddAccess implements addAccess operation.

Insert user in the list of users who are allowed to access data.

POST /admin/access/{role}

func (Handler) AddRBACResource

func (Handler) AddRBACResource(ctx context.Context, params api.AddRBACResourceParams) (r api.AddRBACResourceRes, _ error)

AddRBACResource implements addRBACResource operation.

Add permission role.

PUT /admin/database/{table}/permission/{resource}/{name}

func (Handler) AddView

func (Handler) AddView(ctx context.Context, params api.AddViewParams) (r api.AddViewRes, _ error)

AddView implements addView operation.

Add configuration in View repositories.

POST /admin/config/views

func (Handler) BatchParameterQuery

func (Handler) BatchParameterQuery(ctx context.Context, params api.BatchParameterQueryParams) (r api.BatchParameterQueryRes, _ error)

BatchParameterQuery implements batchParameterQuery operation.

Call a SQL query batch command posted in query.

GET /rest/batch/{table}/{query}

func (Handler) BatchQuery

func (Handler) BatchQuery(ctx context.Context, req api.BatchQueryReq,
	params api.BatchQueryParams) (r api.BatchQueryRes, _ error)

BatchQuery implements batchQuery operation.

Call a SQL query batch command posted in body.

POST /rest/batch/{table}

func (Handler) BatchSelect

func (Handler) BatchSelect(ctx context.Context,
	params api.BatchSelectParams) (r api.BatchSelectRes, _ error)

BatchSelect implements batchSelect operation.

Call a SQL query batch command out of the stored query list.

GET /rest/batch/{table}

func (Handler) BrowseList

func (Handler) BrowseList(ctx context.Context) (r api.BrowseListRes, _ error)

BrowseList implements browseList operation.

Retrieves a list of Browseable locations.

GET /rest/file/browse

func (Handler) BrowseLocation

func (Handler) BrowseLocation(ctx context.Context, params api.BrowseLocationParams) (r api.BrowseLocationRes, _ error)

BrowseLocation implements browseLocation operation.

Retrieves a list of files in the defined location.

GET /rest/file/browse/{path}

func (Handler) CallExtend

func (Handler) CallExtend(ctx context.Context, params api.CallExtendParams) (r api.CallExtendRes, _ error)

CallExtend implements callExtend operation.

Call plugin extend.

GET /rest/extend/{path}

func (Handler) CallPostExtend

CallPostExtend implements callPostExtend operation.

Post extend/plugin.

POST /rest/extend/{path}

func (Handler) CreateDirectory

func (Handler) CreateDirectory(ctx context.Context, params api.CreateDirectoryParams) (r api.CreateDirectoryRes, _ error)

CreateDirectory implements createDirectory operation.

Create a new directory.

PUT /rest/file/{path}

func (Handler) DatabaseOperation

func (Handler) DatabaseOperation(ctx context.Context, params api.DatabaseOperationParams) (r api.DatabaseOperationRes, _ error)

DatabaseOperation implements databaseOperation operation.

Retrieve the current status of database with the given dbid.

GET /admin/database/{table_operation}

func (Handler) DatabasePostOperations

func (Handler) DatabasePostOperations(ctx context.Context, params api.DatabasePostOperationsParams) (r api.DatabasePostOperationsRes, _ error)

DatabasePostOperations implements databasePostOperations operation.

Initiate operations on the given dbid.

POST /admin/database/{table_operation}

func (Handler) DelAccess

func (Handler) DelAccess(ctx context.Context, params api.DelAccessParams) (r api.DelAccessRes, _ error)

DelAccess implements delAccess operation.

Delete user in the list of users who are allowed to access data.

DELETE /admin/access/{role}

func (Handler) DeleteDatabase

func (Handler) DeleteDatabase(ctx context.Context, params api.DeleteDatabaseParams) (r api.DeleteDatabaseRes, _ error)

DeleteDatabase implements deleteDatabase operation.

Delete the database.

DELETE /admin/database/{table_operation}

func (Handler) DeleteExtend

func (Handler) DeleteExtend(ctx context.Context, params api.DeleteExtendParams) (r api.DeleteExtendRes, _ error)

DeleteExtend implements deleteExtend operation.

Delete extend/plugin data.

DELETE /rest/extend/{path}

func (Handler) DeleteFileLocation

func (Handler) DeleteFileLocation(ctx context.Context, params api.DeleteFileLocationParams) (r api.DeleteFileLocationRes, _ error)

DeleteFileLocation implements deleteFileLocation operation.

Delete the file on the given location.

DELETE /rest/file/{path}

func (Handler) DeleteJobResult

func (Handler) DeleteJobResult(ctx context.Context, params api.DeleteJobResultParams) (r api.DeleteJobResultRes, _ error)

DeleteJobResult implements deleteJobResult operation.

Delete a specific job result.

DELETE /tasks/{jobName}/result/{jobId}

func (Handler) DeleteRBACResource

func (Handler) DeleteRBACResource(ctx context.Context, params api.DeleteRBACResourceParams) (r api.DeleteRBACResourceRes, _ error)

DeleteRBACResource implements deleteRBACResource operation.

Delete RBAC role.

DELETE /admin/database/{table}/permission/{resource}/{name}

func (Handler) DeleteRecordsSearched

func (Handler) DeleteRecordsSearched(ctx context.Context, params api.DeleteRecordsSearchedParams) (r api.DeleteRecordsSearchedRes, _ error)

DeleteRecordsSearched implements deleteRecordsSearched operation.

Delete a record with a given search.

DELETE /rest/view/{table}/{search}

func (Handler) DeleteView

func (Handler) DeleteView(ctx context.Context, params api.DeleteViewParams) (r api.DeleteViewRes, _ error)

DeleteView implements deleteView operation.

Delete entry in configuration.

DELETE /admin/config/views

func (Handler) DisconnectTCP

func (Handler) DisconnectTCP(ctx context.Context, params api.DisconnectTCPParams) (r api.DisconnectTCPRes, _ error)

DisconnectTCP implements disconnectTCP operation.

Disconnect connection in the database with the given dbid.

DELETE /admin/database/{table}/connection

func (Handler) DownloadFile

func (Handler) DownloadFile(ctx context.Context, params api.DownloadFileParams) (r api.DownloadFileRes, _ error)

DownloadFile implements downloadFile operation.

Download a file out of file location.

GET /rest/file/{path}

func (Handler) GetConfig

func (Handler) GetConfig(ctx context.Context) (r api.GetConfigRes, _ error)

GetConfig implements getConfig operation.

Get configuration.

GET /admin/config

func (Handler) GetConnections

func (Handler) GetConnections(ctx context.Context, params api.GetConnectionsParams) (r api.GetConnectionsRes, _ error)

GetConnections implements getConnections operation.

Retrieve the current TCP connection.

GET /admin/database/{table}/connection

func (Handler) GetDatabaseSessions

func (Handler) GetDatabaseSessions(ctx context.Context, params api.GetDatabaseSessionsParams) (r api.GetDatabaseSessionsRes, _ error)

GetDatabaseSessions implements getDatabaseSessions operation.

Retrieve a list of user queue entries.

GET /admin/database/{table}/sessions

func (Handler) GetDatabaseStats

func (Handler) GetDatabaseStats(ctx context.Context, params api.GetDatabaseStatsParams) (r api.GetDatabaseStatsRes, _ error)

GetDatabaseStats implements getDatabaseStats operation.

Retrieve SQL statistics.

GET /admin/database/{table}/stats

func (Handler) GetDatabases

func (Handler) GetDatabases(ctx context.Context) (r api.GetDatabasesRes, _ error)

GetDatabases implements getDatabases operation.

Retrieves a list of databases known by Interface.

GET /admin/database

func (Handler) GetEnvironments

func (Handler) GetEnvironments(ctx context.Context) (r api.GetEnvironmentsRes, _ error)

GetEnvironments implements getEnvironments operation.

Retrieves the list of environments.

GET /version/env

func (Handler) GetFields

func (Handler) GetFields(ctx context.Context, params api.GetFieldsParams) (r api.GetFieldsRes, _ error)

GetFields implements getFields operation.

Retrieves all fields of an file.

GET /rest/tables/{table}/fields

func (Handler) GetImage

func (Handler) GetImage(ctx context.Context, params api.GetImageParams) (r api.GetImageRes, _ error)

GetImage implements getImage operation.

Retrieves a field of a specific ISN of a Map definition.

GET /image/{table}/{field}/{search}

func (Handler) GetJobExecutionResult

func (Handler) GetJobExecutionResult(ctx context.Context, params api.GetJobExecutionResultParams) (r api.GetJobExecutionResultRes, _ error)

GetJobExecutionResult implements getJobExecutionResult operation.

Retrieves a specific job result.

GET /tasks/results

func (Handler) GetJobFullInfo

func (Handler) GetJobFullInfo(ctx context.Context, params api.GetJobFullInfoParams) (r api.GetJobFullInfoRes, _ error)

GetJobFullInfo implements getJobFullInfo operation.

Retrieves a full job definition.

GET /tasks/{jobName}/full

func (Handler) GetJobResult

func (Handler) GetJobResult(ctx context.Context, params api.GetJobResultParams) (r api.GetJobResultRes, _ error)

GetJobResult implements getJobResult operation.

Delete a specific job result.

GET /rest/tasks/{jobName}/{jobId}

func (Handler) GetJobs

func (Handler) GetJobs(ctx context.Context, params api.GetJobsParams) (r api.GetJobsRes, _ error)

GetJobs implements getJobs operation.

Retrieves a list of jobs known by the Interface.

GET /tasks

func (Handler) GetJobsConfig

func (Handler) GetJobsConfig(ctx context.Context) (r api.GetJobsConfigRes, _ error)

GetJobsConfig implements getJobsConfig operation.

Read job configuration section.

GET /admin/config/jobs

func (Handler) GetLobByMap

func (Handler) GetLobByMap(ctx context.Context, params api.GetLobByMapParams) (r api.GetLobByMapRes, _ error)

GetLobByMap implements getLobByMap operation.

Retrieves a lob of a specific ISN of an field in a Map.

GET /binary/{table}/{field}/{search}

func (Handler) GetLoginSession

func (Handler) GetLoginSession(ctx context.Context) (r api.GetLoginSessionRes, _ error)

GetLoginSession implements getLoginSession operation.

Login receiving JWT.

GET /login

func (Handler) GetMapMetadata

func (Handler) GetMapMetadata(ctx context.Context, params api.GetMapMetadataParams) (r api.GetMapMetadataRes, _ error)

GetMapMetadata implements getMapMetadata operation.

Retrieves metadata of a Map definition.

GET /rest/metadata/view/{table}

func (Handler) GetMapRecordsFields

func (Handler) GetMapRecordsFields(ctx context.Context, params api.GetMapRecordsFieldsParams) (r api.GetMapRecordsFieldsRes, _ error)

GetMapRecordsFields implements getMapRecordsFields operation.

Retrieves a field of a specific ISN of a Map definition.

GET /rest/view/{table}/{fields}/{search}

func (Handler) GetMaps

func (Handler) GetMaps(ctx context.Context) (r api.GetMapsRes, _ error)

GetMaps implements getMaps operation.

Retrieves a list of available views.

GET /rest/view

func (Handler) GetPermission

func (Handler) GetPermission(ctx context.Context, params api.GetPermissionParams) (r api.GetPermissionRes, _ error)

GetPermission implements getPermission operation.

List RBAC assignments permission.

GET /admin/database/{table}/permission

func (Handler) GetUserInfo

func (Handler) GetUserInfo(ctx context.Context) (r api.GetUserInfoRes, _ error)

GetUserInfo implements getUserInfo operation.

Retrieves the user information.

GET /rest/user

func (Handler) GetVersion

func (Handler) GetVersion(ctx context.Context) (r api.GetVersionRes, _ error)

GetVersion implements getVersion operation.

Retrieves the current version.

GET /version

func (Handler) GetVideo

func (Handler) GetVideo(ctx context.Context, params api.GetVideoParams) (r api.GetVideoRes, _ error)

GetVideo implements getVideo operation.

Retrieves a video stream of a specific ISN of a Map definition.

GET /video/{table}/{field}/{search}

func (Handler) GetViews

func (Handler) GetViews(ctx context.Context) (r api.GetViewsRes, _ error)

GetViews implements getViews operation.

Defines the current views.

GET /admin/config/views

func (Handler) InsertMapFileRecords

func (Handler) InsertMapFileRecords(ctx context.Context, req api.OptInsertMapFileRecordsReq) (r api.InsertMapFileRecordsRes, _ error)

InsertMapFileRecords implements insertMapFileRecords operation.

Store send records into Map definition.

POST /rest/view

func (Handler) InsertRecord

InsertRecord implements insertRecord operation.

Insert given record.

POST /rest/view/{table}

func (Handler) ListModelling

func (Handler) ListModelling(ctx context.Context) (r api.ListModellingRes, _ error)

ListModelling implements listModelling operation.

Retrieves all fields of an file.

GET /rest/map

func (Handler) ListRBACResource

func (Handler) ListRBACResource(ctx context.Context, params api.ListRBACResourceParams) (r api.ListRBACResourceRes, _ error)

ListRBACResource implements listRBACResource operation.

Add RBAC role.

GET /admin/database/{table}/permission/{resource}

func (Handler) ListTables

func (Handler) ListTables(ctx context.Context) (r api.ListTablesRes, _ error)

ListTables implements listTables operation.

Retrieves all tables of databases.

GET /rest/tables

func (Handler) LoginSession

func (Handler) LoginSession(ctx context.Context) (r api.LoginSessionRes, _ error)

LoginSession implements loginSession operation.

Login receiving JWT.

PUT /login

func (Handler) LogoutSessionCompat

func (Handler) LogoutSessionCompat(ctx context.Context) (r api.LogoutSessionCompatRes, _ error)

LogoutSessionCompat implements logoutSessionCompat operation.

Logout the session.

PUT /logout

func (Handler) NewError

func (Handler) NewError(ctx context.Context, err error) (r *api.ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (Handler) PostDatabase

func (Handler) PostDatabase(ctx context.Context, req *api.Database) (r api.PostDatabaseRes, _ error)

PostDatabase implements postDatabase operation.

Create a new database, the input need to be JSON. A structure level parameter indicate version to be used.

POST /admin/database

func (Handler) PostJob

func (Handler) PostJob(ctx context.Context, req api.PostJobReq) (r api.PostJobRes, _ error)

PostJob implements postJob operation.

Create a new Job database.

POST /tasks

func (Handler) PushLoginSession

func (Handler) PushLoginSession(ctx context.Context) (r api.PushLoginSessionRes, _ error)

PushLoginSession implements pushLoginSession operation.

Login receiving JWT.

POST /login

func (Handler) PutDatabaseResource

func (Handler) PutDatabaseResource(ctx context.Context, params api.PutDatabaseResourceParams) (r api.PutDatabaseResourceRes, _ error)

PutDatabaseResource implements putDatabaseResource operation.

Change resource of the database.

PUT /admin/database/{table_operation}

func (Handler) RemovePermission

func (Handler) RemovePermission(ctx context.Context, params api.RemovePermissionParams) (r api.RemovePermissionRes, _ error)

RemovePermission implements removePermission operation.

Add RBAC role.

DELETE /admin/database/{table}/permission

func (Handler) RemoveSessionCompat

func (Handler) RemoveSessionCompat(ctx context.Context) (r api.RemoveSessionCompatRes, _ error)

RemoveSessionCompat implements removeSessionCompat operation.

Remove the session.

GET /logoff

func (Handler) SearchModelling

func (Handler) SearchModelling(ctx context.Context, params api.SearchModellingParams) (r api.SearchModellingRes, _ error)

SearchModelling implements searchModelling operation.

Retrieves all fields of an file.

GET /rest/map/{path}

func (Handler) SearchRecordsFields

func (Handler) SearchRecordsFields(ctx context.Context, params api.SearchRecordsFieldsParams) (r api.SearchRecordsFieldsRes, _ error)

SearchRecordsFields implements searchRecordsFields operation.

Retrieves a field of a specific ISN of a Map definition.

GET /rest/view/{table}/{fields}

func (Handler) SearchTable

func (Handler) SearchTable(ctx context.Context, params api.SearchTableParams) (r api.SearchTableRes, _ error)

SearchTable implements searchTable operation.

Retrieves all fields of an file.

GET /rest/tables/{table}/{fields}/{search}

func (Handler) SetConfig

func (Handler) SetConfig(ctx context.Context, req api.SetConfigReq) (r api.SetConfigRes, _ error)

SetConfig implements setConfig operation.

Store configuration.

PUT /admin/config

func (Handler) SetJobsConfig

func (Handler) SetJobsConfig(ctx context.Context, req api.OptJobStore) (r api.SetJobsConfigRes, _ error)

SetJobsConfig implements setJobsConfig operation.

Set the ADADATADIR.

PUT /admin/config/jobs

func (Handler) ShutdownServer

func (Handler) ShutdownServer(ctx context.Context, params api.ShutdownServerParams) (r api.ShutdownServerRes, _ error)

ShutdownServer implements shutdownServer operation.

Init shutdown procedure.

PUT /shutdown/{hash}

func (Handler) StoreConfig

func (Handler) StoreConfig(ctx context.Context) (r api.StoreConfigRes, _ error)

StoreConfig implements storeConfig operation.

Store configuration.

POST /admin/config

func (Handler) TriggerExtend

func (Handler) TriggerExtend(ctx context.Context, params api.TriggerExtendParams) (r api.TriggerExtendRes, _ error)

TriggerExtend implements triggerExtend operation.

Put extend/plugin request.

PUT /rest/extend/{path}

func (Handler) TriggerJob

func (Handler) TriggerJob(ctx context.Context, params api.TriggerJobParams) (r api.TriggerJobRes, _ error)

TriggerJob implements triggerJob operation.

Trigger a job.

PUT /rest/tasks/{jobName}

func (Handler) UpdateLobByMap

UpdateLobByMap implements updateLobByMap operation.

Set a lob at a specific ISN of an field in a Map.

PUT /binary/{table}/{field}/{search}

func (Handler) UpdateRecordsByFields

UpdateRecordsByFields implements updateRecordsByFields operation.

Update a record dependent on field(s) of a specific table.

PUT /rest/view/{table}/{search}

func (Handler) UploadFile

func (Handler) UploadFile(ctx context.Context, req *api.UploadFileReq, params api.UploadFileParams) (r api.UploadFileRes, _ error)

UploadFile implements uploadFile operation.

Upload a new file to the given location.

POST /rest/file/{location}

type Loader

type Loader struct {
}

Loader config loader structure calling static configurations

func (*Loader) Current

func (loader *Loader) Current() interface{}

Current current active config

func (*Loader) Default

func (loader *Loader) Default() interface{}

Default empty default config

func (*Loader) IsServer

func (loader *Loader) IsServer() bool

IsServer indicate interface to be a server

func (*Loader) Loaded

func (loader *Loader) Loaded(nv interface{}) error

Loaded executed after data load

func (*Loader) Logging

func (loader *Loader) Logging(v interface{}) *services.Logging

Logging logging configuration

func (*Loader) SetLogging

func (loader *Loader) SetLogging(l *services.Logging)

SetLogging set logging configuration

type Location

type Location struct {
	Location string `yaml:"location"`
}

Location location attribute

type LoginService

type LoginService struct {
	Type                 string                       `yaml:"type,omitempty"`
	Module               string                       `yaml:"module,omitempty"`
	Administrators       string                       `yaml:"administrators,omitempty"`
	Users                string                       `yaml:"users,omitempty"`
	AuthenticationServer []*auth.AuthenticationServer `yaml:"authenticationServer,omitempty"`
}

LoginService login service

type Mapping

type Mapping struct {
	CacheUpdater int           `yaml:"cacheTimer,omitempty"`
	DatabaseMap  []DatabaseMap `yaml:"Modeling"`
}

Mapping Adabas Maps

type Printer

type Printer struct {
}

Printer temporary

func (*Printer) Walk

func (p *Printer) Walk(name exif.FieldName, tag *tiff.Tag) error

Walk walk in printer

type RestExtend

type RestExtend interface {
	EntryPoint() string
	Call(path string) (r api.CallExtendRes, _ error)
}

RestExtend Adabas method to send to plugin

type RestServer

type RestServer struct {
	Common       CommonConfig       `yaml:"rest-server"`
	Server       Server             `yaml:"server"`
	Database     DatabaseConfig     `yaml:"database"`
	Tasks        TaskConfig         `yaml:"tasks"`
	FileTransfer FileTransferConfig `yaml:"fileTransfer"`
	Metrics      []*Database
}

RestServer Rest server main node configuration structure containing all referenced parameters reflected to the configuration file.

var Viewer *RestServer

Viewer containing server config

func (*RestServer) CloseConfig

func (viewer *RestServer) CloseConfig()

CloseConfig close configuration watcher

func (*RestServer) InitSecurityInfrastructure

func (viewer *RestServer) InitSecurityInfrastructure()

InitSecurityInfrastructure init configruation data

type Server

type Server struct {
	Service      []*Service        `yaml:"service"`
	WebToken     *auth.WebToken    `yaml:"JWT,omitempty"`
	LoginService LoginService      `yaml:"login"`
	Prefix       string            `yaml:"prefix,omitempty"`
	Content      string            `yaml:"content,omitempty"`
	Plugins      string            `yaml:"plugins,omitempty"`
	LogLocation  *services.Logging `yaml:"location"`
	Shutdown     struct {
		Passcode yaml.Node `yaml:"passcode,omitempty"`
	} `yaml:"shutdown"`
}

Server REST server main configuration parameter

type Service

type Service struct {
	Host              string           `yaml:"host"`
	Port              int              `yaml:"port"`
	Type              string           `yaml:"type"`
	Certificate       string           `yaml:"certificate,omitempty"`
	Key               string           `yaml:"key,omitempty"`
	MaxHeaderSize     flagext.ByteSize `yaml:"maxHeaderSize"`
	ReadTimeout       time.Duration    `yaml:"readTimeout"`
	WriteTimeout      time.Duration    `yaml:"writeTimeout"`
	KeepAlive         int              `yaml:"keepAive"`
	ListenLimit       int              `yaml:"listenLimit"`
	CleanupTimeout    time.Duration    `yaml:"cleanupTimeout"`
	TLSCACertificate  string           `yaml:"TLSCaCertificate"`
	TLSCertificate    string
	TLSCertificateKey string
}

Service service entry

type StatisticConfig

type StatisticConfig struct {
	Metrics *DatabaseAccess `yaml:"metrics"`
}

StatisticConfig statistics configuration

type TaskConfig

type TaskConfig struct {
	Role      string    `yaml:"role,omitempty"`
	UseRole   bool      `yaml:"use_role,omitempty"`
	Directory string    `yaml:"directory,omitempty"`
	Database  *Database `yaml:"database,omitempty"`
}

TaskConfig job store

Jump to

Keyboard shortcuts

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