Versions in this module Expand all Collapse all v0 v0.1.2 Nov 24, 2022 v0.1.1 Nov 22, 2022 Changes in this version + const CheckSumResponseVersion + const FilesystemScope + const GroupScope + const LaunchWebSessionScope + const LetterAndNumberPattern + const ModTimeLayout + const PermissionScope + const SourceName + const TimeFormat + const URI_CHUNKED_UPLOAD + const URI_CREATE_FOLDER + const URI_DELETE_OBJECT + const URI_FETCH_EVENT_ID + const URI_GET_FILE + const URI_GROUPS + const URI_LIST + const URI_OAUTH + const URI_PERMISSIONS + const URI_PREFIX_V1 + const URI_PREFIX_V2 + const URI_USERINFO + const URI_USERS + const UserScope + const Version + var ClientId string + var Domain string + var FolderRequired = errors.New("object must be a folder") + var Password string + var Username string + func Execute() + func GetAccessToken(ctx context.Context, config map[string]string) (*oauth2.Token, error) + func OAuthEndpoint(domain string) oauth2.Endpoint + func SHA512Digest(buf []byte) string + type ChunkUploadInfo struct + func (c *ChunkUploadInfo) GetChunk() ([]byte, int64, int, error) + func (c *ChunkUploadInfo) GetLastChunk() ([]byte, int) + func (c *ChunkUploadInfo) GetRemainingBytes() int64 + func (c *ChunkUploadInfo) GetResultCsum() string + func (c *ChunkUploadInfo) Init(data io.Reader, size int64, chunkSize int64) + func (c *ChunkUploadInfo) SetChunkCheckSum(chunkNum int, csum string) + type Client struct + Email string + Username string + WebAppURL string + func NewClient(ctx context.Context, rootUrl, token string, baseClient *http.Client) (*Client, error) + func (c *Client) CreateGroup(ctx context.Context, name string, members []*GroupMember) (*Group, error) + func (c *Client) CreateUser(ctx context.Context, user *User, sendInvite bool) (*User, error) + func (c *Client) DeleteGroup(ctx context.Context, groupId string) error + func (c *Client) DeleteUser(ctx context.Context, userId int) error + func (c *Client) EventCursor(ctx context.Context) (*EventID, error) + func (c *Client) GetGroup(ctx context.Context, groupId string) (*Group, error) + func (c *Client) GetUser(ctx context.Context, userId int) (*User, error) + func (c *Client) ListGroups(ctx context.Context) ([]*Group, error) + func (c *Client) ListUsers(ctx context.Context) ([]*User, error) + func (c *Client) Object(path string) *Object + func (c *Client) PartialUpdateGroup(ctx context.Context, name string, members []*GroupMember) (*Group, error) + func (c *Client) UpdateGroup(ctx context.Context, name string, members []*GroupMember) (*Group, error) + func (c *Client) UpdateUser(ctx context.Context, user *User) error + func (c *Client) Userinfo(ctx context.Context) (*userInfoResponse, error) + type Error struct + Body string + ErrorCode string + Header http.Header + Message string + StatusCode int + func (e *Error) Error() string + func (e *Error) Timeout() bool + type EventID struct + LatestEventID int64 + OldestEventID int64 + Timestamp string + type FolderPermission struct + GroupPerms map[string]string + InheritsPermissions bool + KeepParentPermissions bool + UserPerms map[string]string + type Group struct + DisplayName string + ID string + Members []*GroupMember + type GroupMember struct + Display string + ID int64 + Username string + type MultiPutFileContent struct + Content string + LastModified string + LastModifiedBy string + type Object struct + AllowLinks bool + Body io.Reader + Checksum string + Client *Client + Count int + EntryID string + Err error + Etag string + Files []*Object + FolderID string + Folders []*Object + GroupID string + IsFolder bool + LastModifiedEpoch int64 + LastModifiedStr string + Locked bool + ModTime time.Time + Name string + NumVersions int + Offset int + ParentID string + Path string + PublicLinks string + RestrictMoveDelete bool + Size int + TotalCount int + Uploaded int64 + UploadedBy string + Versions []*Object + func (o *Object) ChunkUpload(ctx context.Context, uploadInfo *UploadInfo, extraHeaders map[string]string) error + func (o *Object) Copy(ctx context.Context, newPath string) error + func (o *Object) Create(ctx context.Context) (*Object, error) + func (o *Object) Delete(ctx context.Context) error + func (o *Object) Get(ctx context.Context) (io.ReadCloser, error) + func (o *Object) GetPermissions(ctx context.Context) (*FolderPermission, error) + func (o *Object) List(ctx context.Context) (*Object, error) + func (o *Object) Lock(ctx context.Context) error + func (o *Object) Move(ctx context.Context, newPath string) error + func (o *Object) RemoveGroupPermission(ctx context.Context, groupName string) error + func (o *Object) RemoveUserPermission(ctx context.Context, userName string) error + func (o *Object) SetGroupPermission(ctx context.Context, groupName string, permString string) error + func (o *Object) SetPermissions(ctx context.Context, perms FolderPermission) error + func (o *Object) SetUserPermission(ctx context.Context, userName string, permString string) error + func (o *Object) Stats(ctx context.Context) error + func (o *Object) Unlock(ctx context.Context) error + type UploadInfo struct + ChunkNum int + ChunkSize int64 + Csum string + Data io.Reader + Path string + UploadID string + type User struct + Active bool + AuthType string + CreatedDate string + DeleteOnExpiry interface{} + Email string + EmailChangePending bool + ExpiryDate string + ExternalID string + Groups []struct{ ... } + ID int + IdpUserID string + IsServiceAccount bool + Language string + LastActiveDate string + LastModificationDate string + Locked bool + Name UserName + Role string + UserName string + UserPrincipalName string + UserType string + type UserName struct + FamilyName string + GivenName string v0.1.0 Nov 21, 2022