Documentation ¶
Overview ¶
Package msi is package that contains utilities for use in microservices written in Golang. GoRODS/msi provides a binding to the msParam_t type, and its various subtypes. In addition, it provides an interface for calling other microservices.
Index ¶
- Constants
- func Call(msiName string, params ...interface{}) error
- func Configure(ruleExecInfo unsafe.Pointer)
- type ObjReader
- type Param
- func (param *Param) Bytes() []byte
- func (param *Param) ConvertTo(t ParamType) *Param
- func (param *Param) Int() int
- func (param *Param) Ptr() unsafe.Pointer
- func (param *Param) SetBytes(bytes []byte) *Param
- func (param *Param) SetDataObjInp(input map[string]interface{}) *Param
- func (param *Param) SetInt(val int) *Param
- func (param *Param) SetKVP(data map[string]string) *Param
- func (param *Param) SetString(val string) *Param
- func (param *Param) String() string
- func (param *Param) Type() ParamType
- type ParamType
Constants ¶
const ( UNDEFINED_T ParamType = "" STR_MS_T = "STR_PI" INT_MS_T = "INT_PI" INT16_MS_T = "INT16_PI" CHAR_MS_T = "CHAR_PI" BUF_LEN_MS_T = "BUF_LEN_PI" STREAM_MS_T = "INT_PI" DOUBLE_MS_T = "DOUBLE_PI" FLOAT_MS_T = "FLOAT_PI" BOOL_MS_T = "BOOL_PI" DataObjInp_MS_T = "DataObjInp_PI" DataObjCloseInp_MS_T = "DataObjCloseInp_PI" DataObjCopyInp_MS_T = "DataObjCopyInp_PI" DataObjReadInp_MS_T = "dataObjReadInp_PI" DataObjWriteInp_MS_T = "dataObjWriteInp_PI" DataObjLseekInp_MS_T = "fileLseekInp_PI" DataObjLseekOut_MS_T = "fileLseekOut_PI" KeyValPair_MS_T = "KeyValPair_PI" TagStruct_MS_T = "TagStruct_PI" CollInp_MS_T = "CollInpNew_PI" ExecCmd_MS_T = "ExecCmd_PI" ExecCmdOut_MS_T = "ExecCmdOut_PI" RodsObjStat_MS_T = "RodsObjStat_PI" VaultPathPolicy_MS_T = "VaultPathPolicy_PI" StrArray_MS_T = "StrArray_PI" IntArray_MS_T = "IntArray_PI" GenQueryInp_MS_T = "GenQueryInp_PI" GenQueryOut_MS_T = "GenQueryOut_PI" XmsgTicketInfo_MS_T = "XmsgTicketInfo_PI" SendXmsgInfo_MS_T = "SendXmsgInfo_PI" GetXmsgTicketInp_MS_T = "GetXmsgTicketInp_PI" SendXmsgInp_MS_T = "SendXmsgInp_PI" RcvXmsgInp_MS_T = "RcvXmsgInp_PI" RcvXmsgOut_MS_T = "RcvXmsgOut_PI" StructFileExtAndRegInp_MS_T = "StructFileExtAndRegInp_PI" RuleSet_MS_T = "RuleSet_PI" RuleStruct_MS_T = "RuleStruct_PI" DVMapStruct_MS_T = "DVMapStruct_PI" FNMapStruct_MS_T = "FNMapStruct_PI" MsrvcStruct_MS_T = "MsrvcStruct_PI" NcOpenInp_MS_T = "NcOpenInp_PI" NcInqIdInp_MS_T = "NcInqIdInp_PI" NcInqWithIdOut_MS_T = "NcInqWithIdOut_PI" NcInqInp_MS_T = "NcInqInp_PI" NcCloseInp_MS_T = "NcCloseInp_PI" NcGetVarInp_MS_T = "NcGetVarInp_PI" NcGetVarOut_MS_T = "NcGetVarOut_PI" NcInqOut_MS_T = "NcInqOut_PI" NcInqGrpsOut_MS_T = "NcInqGrpsOut_PI" Dictionary_MS_T = "Dictionary_PI" DictArray_MS_T = "DictArray_PI" GenArray_MS_T = "GenArray_PI" DataObjInfo_MS_T = "DataObjInfo_PI" )
Types avaliable for use in msi.NewParam()
const ( SUCCESS = 0 SYS_INTERNAL_ERR = -154000 SYS_INVALID_INPUT_PARAM = -130000 )
iRODS constants for use in microservice return value
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ObjReader ¶
type ObjReader struct {
// contains filtered or unexported fields
}
ObjReader provides a golang io.Reader interface for iRODS data object, identified by the INT_MS_T object reference
func NewObjReader ¶
NewObjReader accepts an iRODS data object path string, opens a reference to the object using msiDataObjOpen, and returns an *ObjReader which satisfies the io.Reader interface.
func NewObjReaderFromDesc ¶
NewObjReaderFromDesc creates a new *ObjReader from an existing descriptor
type Param ¶
type Param struct {
// contains filtered or unexported fields
}
Param is the golang abstraction for *C.msParam_t types
func (*Param) ConvertTo ¶
ConvertTo rebuilds the underlying data of msParam_t*, to the given ParamType. This is useful for setting the types of output parameters, since they are blank when passed to the microservice. If msParam_t* is nil, it is set to a newly allocated structure.
func (*Param) SetBytes ¶
SetBytes sets the underlying BUF_LEN_MS_T struct to the provided byte slice
func (*Param) SetDataObjInp ¶
SetDataObjInp sets the underlying DataObjInp_MS_T struct fields from a map Valid keys and values are: {"objPath": string, "createMode": int, "openFlags": int}