Versions in this module Expand all Collapse all v0 v0.1.1 Jan 16, 2020 v0.1.0 Oct 1, 2019 Changes in this version + var CacheCategory = &cacheCategory + var ErrTokenExpire = fmt.Errorf("ot: token expired") + type Category struct + Data []Value + DisplayName string + Key string + Type string + func (c *Category) Bool(name string, v *bool) error + func (c *Category) Copy() *Category + func (c *Category) Int(name string, v *int) error + func (c *Category) Set(v ...NameValueType) error + func (c *Category) String(name string, v *string) error + func (c *Category) Time(name string, v *time.Time) error + func (c *Category) Upgrade(new Category) error + func (c Category) IDVersion() (id int64, version int) + type Document struct + Comment string + File *FileAttr + Metadata Metadata + Name string + Parent int64 + Reader io.Reader + VersionControl bool + type DuplicateNameError struct + type Endpoint struct + func NewEndpoint(addr string) *Endpoint + func (e *Endpoint) Token(token string) *Session + func (e *Endpoint) User(username, password string) *Session + type Feature struct + BooleanValue *bool + DateValue *time.Time + IntegerValue *int + LongValue *float64 + Name string + StringValue *string + Type string + type FileAttr struct + Created time.Time + Modified time.Time + Name string + NodeID int64 + Size int64 + func OpenFile(name string) (*os.File, *FileAttr, error) + func (f *FileAttr) MarshalOscriptBuf(buf oscript.Buffer) error + type Metadata struct + Categories []Category + func (m Metadata) Find(name string) *Category + type NameValueType struct + Name string + Type TypeValue + Value []interface{} + func AttrBool(name string, v bool) NameValueType + func AttrInt(name string, v int) NameValueType + func AttrNil(name string) NameValueType + func AttrString(name string, v string) NameValueType + func AttrTime(name string, v time.Time) NameValueType + type Node struct + Catalog int32 + Comment string + ContainerInfo NodeContainerInfo + CreateDate time.Time + CreatedBy int32 + DisplayType string + Feature []Feature + ID int64 + IsContainer bool + IsReference bool + IsReservable bool + IsVersional bool + Metadata Metadata + ModifyDate time.Time + Name string + Nickname string + Parent int64 + PartialData bool + Permissions Permissions + Position int64 + ReferenceInfo NodeReferenceInfo + Released bool + ReservationInfo NodeReservationInfo + Type string + VersionInfo NodeVersionInfo + VolumeID int64 + type NodeContainerInfo struct + ChildCount int + ChildTypes []string + type NodeReferenceInfo struct + OriginalID int64 + OriginalType string + VersionNum int64 + type NodeReservationInfo struct + Reserved bool + ReservedBy int64 + ReservedDate *time.Time + type NodeRetrievalError struct + func (re *NodeRetrievalError) NotFound() bool + type NodeRight struct + ID int64 + Perm Permissions + Type string + type NodeRights struct + ACLRights []NodeRight + OwnerGroupRight NodeRight + OwnerRight NodeRight + PublicRight NodeRight + type NodeVersionInfo struct + AdvancedVersionControl bool + FileDataSize int64 + FileResSize int64 + Major int64 + MimeType string + SupportsAdvancedVersionControl bool + VersionNum int64 + Versions []Version + VersionsToKeep int + type Permissions struct + Create bool + Delete bool + DeleteVer bool + EditAttr bool + EditPerm bool + Modify bool + Reserve bool + See bool + SeeContent bool + type Session struct + func (s *Session) AddNodeRight(ctx context.Context, id int64, right NodeRight) error + func (s *Session) AddVersionFile(ctx context.Context, file *FileAttr, r io.Reader) error + func (s *Session) Call(ctx context.Context, serviceMethod string, args oscript.M, reply interface{}) error + func (s *Session) CreateDocument(ctx context.Context, doc Document) error + func (s *Session) CreateFile(ctx context.Context, parent int64, name string, file *FileAttr, r io.Reader) error + func (s *Session) CreateFolder(ctx context.Context, parentID int64, name, comment string, metadata Metadata) (*Node, error) + func (s *Session) CreateGroup(ctx context.Context, name string, leaderID *string) (int64, error) + func (s *Session) CreateNode(ctx context.Context, node *Node) error + func (s *Session) Debug(w io.Writer) *Session + func (s *Session) DeleteNode(ctx context.Context, id int64) error + func (s *Session) GetCategory(ctx context.Context, id int64) (*Category, error) + func (s *Session) GetNode(ctx context.Context, id int64) (*Node, error) + func (s *Session) GetNodeByNickname(ctx context.Context, nickname string) (*Node, error) + func (s *Session) GetNodeRights(ctx context.Context, id int64) (*NodeRights, error) + func (s *Session) GetSessionExpiration(ctx context.Context) (time.Time, error) + func (s *Session) GetToken(ctx context.Context, username, password string) (string, error) + func (s *Session) ReadFile(ctx context.Context, id, version int64, w io.Writer) (*FileAttr, error) + func (s *Session) RefreshToken(ctx context.Context) (string, error) + func (s *Session) RemoveNodeRight(ctx context.Context, id int64, right NodeRight) error + func (s *Session) RenameNode(ctx context.Context, id int64, name string) error + func (s *Session) ReserveNode(ctx context.Context, id int64, user int64) error + func (s *Session) UnreserveNode(ctx context.Context, id int64) error + func (s *Session) UpdateNode(ctx context.Context, node *Node) error + func (s *Session) UpdateNodeRight(ctx context.Context, id int64, right NodeRight) error + func (s *Session) UpdateVersion(ctx context.Context, v Version) error + type TypeValue int + const BoolType + const IntType + const NilType + const StringType + const TimeType + func (t *TypeValue) UnmarshalOscript(b []byte) error + func (t TypeValue) MarshalOscript() ([]byte, error) + func (t TypeValue) String() string + type Value struct + Description string + Key string + Type TypeValue + Value []interface{} + type Version struct + Comment string + CreateDate time.Time + FileCreateDate time.Time + FileCreator string + FileDataSize int64 + FileModifyDate time.Time + FileName string + FilePlatform int + FileResSize int64 + FileType string + ID int64 + Locked int + LockedBy int64 + LockedDate time.Time + Metadata Metadata + MimeType string + ModifyDate time.Time + Name string + NodeID int64 + Number int64 + Owner int64 + ProviderID int64 + ProviderName string + Type string + VerMajor int64 + VerMinor int64