Documentation
¶
Overview ¶
Example (ZeroRunDecode) ¶
data := []uint32{0, 2, 4, 2, 0, 4, 3, 0, 1}
decoded := zeroRunDecode(data)
fmt.Printf("%+v\n", decoded)
Output: [0 0 4 2 0 0 0 0 3 0]
Index ¶
- Variables
- func ClearJWTCache()
- func GetJWTFromCache(host string, user string, pass string) string
- type APIClient
- func (c *APIClient) CreateROI(roiItem *protos.ROIItem, isMist bool) (*protos.RegionOfInterestWriteResp, error)
- func (c *APIClient) DeleteImage(imageName string) error
- func (c *APIClient) DeleteROI(roiId string) error
- func (c *APIClient) GetDiffractionAsMap(scanId string, energyCalibrationSource protos.EnergyCalibrationSource, ...) (*protos.ClientMap, error)
- func (c *APIClient) GetDiffractionPeaks(scanId string, energyCalibrationSource protos.EnergyCalibrationSource) (*protos.ClientDiffractionData, error)
- func (c *APIClient) GetQuant(quantId string, summaryOnly bool) (*protos.QuantGetResp, error)
- func (c *APIClient) GetQuantColumnAsMap(quantId string, columnName string, detector string) (*protos.ClientMap, error)
- func (c *APIClient) GetQuantColumns(quantId string) (*protos.ClientStringList, error)
- func (c *APIClient) GetROI(id string, isMist bool) (*protos.RegionOfInterestGetResp, error)
- func (c *APIClient) GetRoughnessAsMap(scanId string, energyCalibrationSource protos.EnergyCalibrationSource) (*protos.ClientMap, error)
- func (c *APIClient) GetScanBeamLocations(scanId string) (*protos.ClientBeamLocations, error)
- func (c *APIClient) GetScanBulkSumCalibration(scanId string) (*protos.ClientEnergyCalibration, error)
- func (c *APIClient) GetScanEntries(scanId string) (*protos.ScanEntryResp, error)
- func (c *APIClient) GetScanEntryDataColumnAsMap(scanId string, columnName string) (*protos.ClientMap, error)
- func (c *APIClient) GetScanEntryDataColumns(scanId string) (*protos.ClientStringList, error)
- func (c *APIClient) GetScanImageBeamLocationVersions(imageName string) (*protos.ImageBeamLocationVersionsResp, error)
- func (c *APIClient) GetScanImageBeamLocations(imageName string, scanId string, version int32) (*protos.ImageBeamLocationsResp, error)
- func (c *APIClient) GetScanMetaData(scanId string) (*protos.ScanEntryMetadataResp, error)
- func (c *APIClient) GetScanMetaList(scanId string) (*protos.ScanMetaLabelsAndTypesResp, error)
- func (c *APIClient) GetScanSpectrum(scanId string, pmc int32, spectrumType protos.SpectrumType, detector string) (*protos.ClientSpectrum, error)
- func (c *APIClient) GetScanSpectrumRangeAsMap(scanId string, channelStart int32, channelEnd int32, detector string) (*protos.ClientMap, error)
- func (c *APIClient) GetTag(tagId string) (*protos.Tag, error)
- func (c *APIClient) GetTagByName(tagName string) (*protos.ClientTagList, error)
- func (c *APIClient) ListScanImages(scanIds []string, mustIncludeAll bool) (*protos.ImageListResp, error)
- func (c *APIClient) ListScanQuants(scanId string) (*protos.QuantListResp, error)
- func (c *APIClient) ListScanROIs(scanId string) (*protos.RegionOfInterestListResp, error)
- func (c *APIClient) ListScans(scanId string) (*protos.ScanListResp, error)
- func (c *APIClient) LoadMapData(key string) (*protos.ClientMap, error)
- func (c *APIClient) SaveMapData(key string, data *protos.ClientMap) error
- func (c *APIClient) SetUserScanCalibration(scanId string, detector string, starteV float32, perChanneleV float32) (*protos.ClientEnergyCalibration, error)
- func (c *APIClient) UploadImage(imageUpload *protos.ImageUploadHttpRequest) error
- func (c *APIClient) UploadImageBeamLocations(imageName string, locForScan *protos.ImageLocationsForScan) error
- type Auth0Info
- type ClientConfig
- type ConnectInfo
- type PIXLISEConfig
- type SocketConn
- func (s *SocketConn) Connect(connectParams ConnectInfo, auth0Params Auth0Info) error
- func (s *SocketConn) Disconnect() error
- func (s *SocketConn) GetHost(path string) (*url.URL, error)
- func (s *SocketConn) SendMessage(msg *protos.WSMessage) error
- func (s *SocketConn) WaitForMessages(msgCount int, timeout time.Duration) []*protos.WSMessage
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ClientMapKeyPrefix = "client-map-"
Functions ¶
func ClearJWTCache ¶
func ClearJWTCache()
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func Authenticate ¶
Authenticates using one of several methods: - First it looks for the environment variable, if found, it uses that, but if errors out we continue... - Second it looks for the config file in pre-defined path. If found, uses that.
func AuthenticateWithAuth0Info ¶
func AuthenticateWithAuth0Info(connectParams ConnectInfo, auth0Params Auth0Info) (*APIClient, error)
func (*APIClient) DeleteImage ¶ added in v4.54.1
func (*APIClient) GetDiffractionAsMap ¶ added in v4.54.1
func (*APIClient) GetDiffractionPeaks ¶
func (c *APIClient) GetDiffractionPeaks(scanId string, energyCalibrationSource protos.EnergyCalibrationSource) (*protos.ClientDiffractionData, error)
func (*APIClient) GetQuantColumnAsMap ¶ added in v4.54.1
func (*APIClient) GetQuantColumns ¶
func (c *APIClient) GetQuantColumns(quantId string) (*protos.ClientStringList, error)
func (*APIClient) GetRoughnessAsMap ¶ added in v4.54.1
func (*APIClient) GetScanBeamLocations ¶
func (c *APIClient) GetScanBeamLocations(scanId string) (*protos.ClientBeamLocations, error)
func (*APIClient) GetScanBulkSumCalibration ¶
func (c *APIClient) GetScanBulkSumCalibration(scanId string) (*protos.ClientEnergyCalibration, error)
func (*APIClient) GetScanEntries ¶
func (c *APIClient) GetScanEntries(scanId string) (*protos.ScanEntryResp, error)
func (*APIClient) GetScanEntryDataColumnAsMap ¶ added in v4.54.1
func (*APIClient) GetScanEntryDataColumns ¶
func (c *APIClient) GetScanEntryDataColumns(scanId string) (*protos.ClientStringList, error)
func (*APIClient) GetScanImageBeamLocationVersions ¶
func (c *APIClient) GetScanImageBeamLocationVersions(imageName string) (*protos.ImageBeamLocationVersionsResp, error)
func (*APIClient) GetScanImageBeamLocations ¶
func (c *APIClient) GetScanImageBeamLocations(imageName string, scanId string, version int32) (*protos.ImageBeamLocationsResp, error)
version can be -1 to indicate we just want the latest
func (*APIClient) GetScanMetaData ¶
func (c *APIClient) GetScanMetaData(scanId string) (*protos.ScanEntryMetadataResp, error)
func (*APIClient) GetScanMetaList ¶
func (c *APIClient) GetScanMetaList(scanId string) (*protos.ScanMetaLabelsAndTypesResp, error)
func (*APIClient) GetScanSpectrum ¶
func (c *APIClient) GetScanSpectrum(scanId string, pmc int32, spectrumType protos.SpectrumType, detector string) (*protos.ClientSpectrum, error)
func (*APIClient) GetScanSpectrumRangeAsMap ¶ added in v4.54.1
func (c *APIClient) GetScanSpectrumRangeAsMap(scanId string, channelStart int32, channelEnd int32, detector string) (*protos.ClientMap, error)
Adds up all channels from channelStart, to channel at index channelEnd-1 Therefore if you request just one channel, you would have to set it to channelStart=10, channelEnd=11 NOTE: channelStart can be -1, which will just make it start from 0 channelEnd can be -1, which will be interpreted as all channels
func (*APIClient) GetTagByName ¶ added in v4.54.6
func (c *APIClient) GetTagByName(tagName string) (*protos.ClientTagList, error)
func (*APIClient) ListScanImages ¶
func (*APIClient) ListScanQuants ¶
func (c *APIClient) ListScanQuants(scanId string) (*protos.QuantListResp, error)
func (*APIClient) ListScanROIs ¶
func (c *APIClient) ListScanROIs(scanId string) (*protos.RegionOfInterestListResp, error)
func (*APIClient) ListScans ¶
func (c *APIClient) ListScans(scanId string) (*protos.ScanListResp, error)
func (*APIClient) LoadMapData ¶ added in v4.54.1
func (*APIClient) SaveMapData ¶ added in v4.54.1
func (*APIClient) SetUserScanCalibration ¶
func (*APIClient) UploadImage ¶ added in v4.54.1
func (c *APIClient) UploadImage(imageUpload *protos.ImageUploadHttpRequest) error
func (*APIClient) UploadImageBeamLocations ¶ added in v4.54.5
func (c *APIClient) UploadImageBeamLocations(imageName string, locForScan *protos.ImageLocationsForScan) error
type ClientConfig ¶
type ClientConfig struct {
Host string
User string
Password string
LocalConfig *PIXLISEConfig
}
type ConnectInfo ¶
type PIXLISEConfig ¶
type SocketConn ¶
type SocketConn struct {
Host string
HostProtocol string
JWT string
UserId string
// contains filtered or unexported fields
}
func (*SocketConn) Connect ¶
func (s *SocketConn) Connect(connectParams ConnectInfo, auth0Params Auth0Info) error
Inspired by: https://tradermade.com/tutorials/golang-websocket-client
func (*SocketConn) Disconnect ¶
func (s *SocketConn) Disconnect() error
func (*SocketConn) GetHost ¶ added in v4.54.1
func (s *SocketConn) GetHost(path string) (*url.URL, error)
func (*SocketConn) SendMessage ¶
func (s *SocketConn) SendMessage(msg *protos.WSMessage) error
func (*SocketConn) WaitForMessages ¶
Parameters define stop conditions, either how many messages or how much time to wait