Versions in this module Expand all Collapse all v1 v1.2.1 Jan 11, 2023 Changes in this version + var ErrInvalidPersid = errors.New("persid must be a semicolon separated <factory:value>") + var ErrRestBadRequest = errors.New("bad request") + var ErrRestConflict = errors.New("conflict") + var ErrRestExpired = errors.New("session expired") + var ErrRestInternal = errors.New("internal") + var ErrRestNoLoginMeth = errors.New("no login method") + var ErrRestNotFound = errors.New("not found") + var ErrRestNotLoggedIn = errors.New("not logged in") + var ErrRestUnathorized = errors.New("unauthorized") + var ErrRestUploadFailed = errors.New("file upload failed") + var SdmReturnAllFields = []string + func NewLoginSecretKey(username, password string, signFields []string, hmacAlg HmacAlgorithm) *loginSecretKey + func NewLoginUserPassword(username, password string) *loginUserPassword + func SdmNull() *sdmNull + type Access struct + func NewAccess(id string, accessKey int, expirationDate int64, secretKey string) *Access + type AccessJSON struct + AccessDataJSON struct{ ... } + func (b *AccessJSON) Access() *Access + type AccessXML struct + AccessKey int + ExpirationDate int64 + ID string + SecretKey string + func (b *AccessXML) Access() *Access + type Attmnt struct + AttmntName string + Description string + FileName string + Repo *AttmntRepo + XMLName xml.Name + type AttmntContentType uint8 + const AttmntContentTypeBase64 + const AttmntContentTypeBinary + type AttmntRepo struct + Id string + type AttmntReq struct + Attmnt *Attmnt + XMLName xml.Name + type GetFilter uint8 + const GetFilterAll + const GetFilterCollection + const GetFilterCommonName + const GetFilterID + const GetFilterRelAttr + const GetFilterUndefined + const GetFilterWC + type HmacAlgorithm uint + const HmacMD5 + const HmacSHA1 + const HmacSHA256 + const HmacSHA384 + const HmacSHA512 + type Login interface + Login func(*client) error + Logout func(*client) error + Session func() *Access + Token func(*http.Request) error + UpdSession func(*Access) + type LoginRequestBody struct + Access *string + XMLName xml.Name + type RestError struct + Code int + Message string + func (e *RestError) Error() string + type ResultShift struct + Size int + Start int + func (s *ResultShift) Next() *ResultShift + func (s *ResultShift) String() string + type ResultType interface + type ResultTypeAttmnt string + type ResultTypeDecoded map[string]interface + type ResultTypeRaw []byte + type SdmID uint + func NewSdmID(intfc interface{}) SdmID + func (id SdmID) ToID() string + type SdmIDType interface + ToID func() string + func NewSdmIDType(intfc interface{}) SdmIDType + type SdmPersid struct + func NewSdmPersid(s string) (*SdmPersid, error) + func (id *SdmPersid) ToID() string + type SdmRest struct + func NewSdmRest(restURI, repoID, serverName string, schema SdmRestSchema, auth Login, ...) *SdmRest + func NewSdmRestWithCli(cli SdmRestInterface) *SdmRest + func (c *SdmRest) Create(factory string, fields []string, data *SdmRestData, result ResultType) error + func (c *SdmRest) Delete(factory, id string, result ResultType) error + func (c *SdmRest) Download(attmntID string) ([]byte, error) + func (c *SdmRest) DownloadFile(attmntID string, path string) error + func (c *SdmRest) GetAll(factory string, shift *ResultShift, returnFlds []string, result ResultType) error + func (c *SdmRest) GetByCommonName(factory, name string, shift *ResultShift, returnFlds []string, ...) error + func (c *SdmRest) GetByID(factory string, id SdmIDType, returnFlds []string, result ResultType) error + func (c *SdmRest) GetByPersid(persid string, returnFlds []string, result ResultType) error + func (c *SdmRest) GetByRelAttr(factory, val string, returnFlds []string, result ResultType) error + func (c *SdmRest) GetByWhereClause(factory, wc string, shift *ResultShift, returnFlds []string, result ResultType) error + func (c *SdmRest) GetColletction(factory, id, collection string, shift *ResultShift, returnFlds []string, ...) error + func (c *SdmRest) Login() error + func (c *SdmRest) Logout() error + func (c *SdmRest) Update(factory, id string, returnFlds []string, data *SdmRestData, result ResultType) error + func (c *SdmRest) Upload(data []byte, fileName, mime, description string, content AttmntContentType) (*string, error) + func (c *SdmRest) UploadFile(path, fileName, description string, content AttmntContentType) (*string, error) + type SdmRestData map[string]interface + type SdmRestInterface interface + type SdmRestSchema string + var SdmRestSchemaJSON SdmRestSchema = "application/json" + var SdmRestSchemaXML SdmRestSchema = "application/xml" + func NewSchema(s string) SdmRestSchema + func (s SdmRestSchema) Decode(r io.Reader, v interface{}) error + func (s SdmRestSchema) Marshal(v interface{}) ([]byte, error) + type SdmUUID [16]byte + func NewSdmUUID(s string) (id SdmUUID) + func (id SdmUUID) String() string + func (id SdmUUID) ToID() string v1.2.0 Jan 10, 2023 v1.1.0 Jan 10, 2023