Documentation ¶
Index ¶
- type CustomRequest
- type DTReqColumn
- type DTReqOrder
- type DTReqSearch
- type DataSourceTS
- type DataTableRequest
- type DatasetInTapeDisk
- type DatatableBaseResponse
- type DetailedDataset
- type EachRseDetailsRequest
- type Epoch
- type MainDataset
- type SearchBuilderRequest
- type ServerInfoResp
- type ShortUrl
- type ShortUrlRequest
- type SingleCriteria
- type StringArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomRequest ¶
type CustomRequest struct { Dataset string `json:"dataset"` Rse string `json:"rse"` Tier string `json:"tier"` RseCountry string `json:"rseCountry"` RseKind string `json:"rseKind"` Accounts []string `json:"accounts"` RseType []string `json:"rseType"` }
CustomRequest represents custom fields that added for details page
func (*CustomRequest) String ¶
func (r *CustomRequest) String() string
String returns string representation of dbs SearchBuilderRequest
type DTReqColumn ¶
type DTReqColumn struct { Data string `json:"data"` // Column name Name string `json:"name"` // Column name to be used in page if it is different from source data Searchable bool `json:"searchable"` // Orderable bool `json:"orderable"` // Search DTReqSearch `json:"search"` // If client requested search against individual column }
DTReqColumn represents client column selections like; sort order, search text for that column
type DTReqOrder ¶
type DTReqOrder struct { Column int `json:"column"` // Column index number in the columns list (order not changes) Dir string `json:"dir" binding:"oneof=asc desc"` // asc or desc }
DTReqOrder represents the selected column direction.
type DTReqSearch ¶
DTReqSearch represents main search text which client entered and can be regex or not.
In default in this service, all search text will be behaved as "REGEX" instead of fuzzy search. TODO separate regex and fuzzy search by providing option in the frontend
type DataSourceTS ¶
type DataSourceTS struct { Id primitive.ObjectID `bson:"_id"` // do not send in the json CreatedAt string `bson:"createdAt,omitempty" validate:"required"` }
DataSourceTS struct contains data production time means; alas hadoop dumps time-stamp
type DataTableRequest ¶
type DataTableRequest struct { Draw int `json:"draw" validate:"required" binding:"required"` // Just a counter that should be return exactly in the response Columns []DTReqColumn `json:"columns" validate:"required" binding:"required"` // Includes user input for columns (like search text for the column) Length int64 `json:"length"` // Number of records that the table can display in the current draw. Orders []DTReqOrder `json:"order"` // Start int64 `json:"start"` // SearchBuilderRequest SearchBuilderRequest `json:"searchBuilderRequest"` // SearchBuilderRequest (custom addition to DataTables request object) }
DataTableRequest main ajax request that come from DataTable, which includes user inputs
For full field descriptions, please see https://datatables.net/manual/server-side#Sent-parameters
func (*DataTableRequest) String ¶
func (r *DataTableRequest) String() string
String returns string representation of DataTableRequest
type DatasetInTapeDisk ¶
type DatasetInTapeDisk struct { Dataset string `bson:"Dataset,omitempty" validate:"required"` MaxSize int64 `bson:"MaxSize"` // Max size of dataset in listed RSEs TapeFullyReplicatedRseCount int64 `bson:"TapeFullyReplicatedRseCount"` DiskFullyReplicatedRseCount int64 `bson:"DiskFullyReplicatedRseCount"` TapeFullyLockedRseCount int64 `bson:"TapeFullyLockedRseCount"` DiskFullyLockedRseCount int64 `bson:"DiskFullyLockedRseCount"` TapeRseCount int64 `bson:"TapeRseCount"` DiskRseCount int64 `bson:"DiskRseCount"` TapeRseSet StringArray `bson:"TapeRseSet"` // Tape RSEs array DiskRseSet StringArray `bson:"DiskRseSet"` // Disk RSEs array }
DatasetInTapeDisk struct of datasets in both tape and disk, collection: dataset_in_tape_disk
type DatatableBaseResponse ¶
type DatatableBaseResponse struct { Draw int `json:"draw" validate:"required"` // The value that came in DataTable request, same should be returned RecordsTotal int64 `json:"recordsTotal" validate:"required"` // Total records which will be showed in the footer RecordsFiltered int64 `json:"recordsFiltered" validate:"required"` // Filtered record count which will be showed in the footer Data interface{} `json:"data" validate:"required"` // Data }
DatatableBaseResponse represents JQuery DataTables response format
type DetailedDataset ¶
type DetailedDataset struct { Type string `bson:"Type" validate:"required"` Dataset string `bson:"Dataset,omitempty" validate:"required"` RSE string `bson:"RSE,omitempty" validate:"required"` Tier string `bson:"Tier" validate:"required"` C string `bson:"C" validate:"required"` // Country RseKind string `bson:"RseKind" validate:"required"` SizeBytes int64 `bson:"SizeBytes"` LastAccess Epoch `bson:"LastAccess"` // Last access to dataset in ISO8601 format IsFullyReplicated bool `bson:"IsFullyReplicated"` IsLocked string `bson:"IsLocked"` FilePercentage float64 `bson:"FilePercentage"` FileCount int64 `bson:"FileCount"` // File count of the dataset in the RSE AccessedFileCount int64 `bson:"AccessedFileCount"` BlockCount int64 `bson:"BlockCount"` ProdLockedBlockCount int64 `bson:"ProdLockedBlockCount"` ProdAccounts StringArray `bson:"ProdAccounts"` // Production accounts that locked the files BlockRuleIDs StringArray `bson:"BlockRuleIDs"` }
DetailedDataset struct which includes Rucio and DBS calculated values for detailed datasets info
type EachRseDetailsRequest ¶
type EachRseDetailsRequest struct { Dataset string `json:"dataset" validate:"required" binding:"required"` // dataset name Type string `json:"type"` // RSE type name }
EachRseDetailsRequest accepts dataset and its RSE type
type Epoch ¶
type Epoch int64
Epoch type used for converting integer unix time to string date format with some customization in custom MarshalJSON
func (Epoch) MarshalJSON ¶
MarshalJSON marshal integer unix time to date string in YYYY-MM-DD format
type MainDataset ¶
type MainDataset struct { RseType string `bson:"RseType,omitempty" validate:"required"` Dataset string `bson:"Dataset,omitempty" validate:"required"` LastAccess Epoch `bson:"LastAccess"` Max float64 `bson:"Max"` Min float64 `bson:"Min"` Avg float64 `bson:"Avg"` Sum float64 `bson:"Sum"` RealSize float64 `bson:"RealSize"` TotalFileCnt int64 `bson:"TotalFileCnt"` RSEs string `bson:"RSEs"` }
MainDataset struct which includes Rucio and DBS calculated values
type SearchBuilderRequest ¶
type SearchBuilderRequest struct { Criteria []SingleCriteria `json:"criteria,omitempty"` Logic string `json:"logic,omitempty"` // There are "OR" and "AND" options. InputDataset string `json:"inputDataset,omitempty"` // Main search bar entry for dataset }
SearchBuilderRequest datatables search builder request format
func (*SearchBuilderRequest) GetPrettyURL ¶
func (r *SearchBuilderRequest) GetPrettyURL() string
func (*SearchBuilderRequest) String ¶
func (r *SearchBuilderRequest) String() string
String returns string representation of dbs SearchBuilderRequest
type ServerInfoResp ¶
ServerInfoResp custom response struct for service information
type ShortUrl ¶
type ShortUrl struct { HashId string `bson:"hashId,omitempty" validate:"required"` Page string `bson:"page" validate:"required"` // Page name: main, detailed, etc. Request DataTableRequest `bson:"dtRequest,omitempty" validate:"required"` SavedState map[string]interface{} `bson:"savedState"` // Saved state of datatables }
ShortUrl struct is used for key:value couples of unique id and datatables request
type ShortUrlRequest ¶
type ShortUrlRequest struct { Page string `json:"page"` Request DataTableRequest `json:"dtRequest"` SavedState map[string]interface{} `json:"savedState"` }
ShortUrlRequest represents short url incoming request that will be fired from client
func (*ShortUrlRequest) String ¶
func (r *ShortUrlRequest) String() string
String returns string representation of ShortUrlRequest
type SingleCriteria ¶
type SingleCriteria struct { // "contains" renamed as "regex" in the page and regex search will be applied Condition string `json:"condition,omitempty"` // Column display name Data string `json:"data,omitempty"` // Actual column name OrigData string `json:"origData,omitempty"` // Data type that is comprehended by DT Type string `json:"type,omitempty"` // List of user values Value []string `json:"value,omitempty"` }
SingleCriteria condition object of SearchBuilderRequest
Ref: https://datatables.net/extensions/searchbuilder/examples/ Datatables search builder does not support GoLang backend, but here we're :) We're catching the JSON of SB from .getDetails() function and use it for our needs.
type StringArray ¶
type StringArray []string
StringArray type used for converting array with comma separated
func (StringArray) MarshalJSON ¶
func (t StringArray) MarshalJSON() ([]byte, error)
MarshalJSON marshal integer unix time to date string in YYYY-MM-DD format