shares

package
v0.0.0-...-23ce5c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 13 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSharedElement

func LoadSharedElement(s *Share) (*models.ShareElement, error)

LoadSharedElement performs api call to load_shared_element_data

func LoadShares

func LoadShares() (map[string]*Share, []error, error)

func LoadWorkspace

func LoadWorkspace(repositoryId string) (*models.AdminWorkspace, error)

LoadWorkspace loads AdminWorkspace from API

func OpenAdminPermission

func OpenAdminPermission(workspaceId string) error

func ParseWorkspacePath

func ParseWorkspacePath(ws *models.AdminWorkspace) (string, error)

func RecurseParentPaths

func RecurseParentPaths(loadedShares map[string]*Share, share *Share) (newPath string, parentWs *models.AdminWorkspace, topOwnerId string, e error)

func SetConfig

func SetConfig(sdkConfig *config.SdkConfig)

Types

type Cursor

type Cursor struct {
	Offset int `json:"0"`
	Limit  int `json:"1"`
	Total  int `json:"total"`
}

type ListSharesResponse

type ListSharesResponse struct {
	Shares map[string]*models.Share `json:"data"`
	Cursor Cursor                   `json:"cursor"`
}

type Share

type Share struct {
	models.Share
	// contains filtered or unexported fields
}

func NewShareFromModel

func NewShareFromModel(listKey string, ms *models.Share) (*Share, error)

func (*Share) GetElement

func (s *Share) GetElement() *ShareElement

func (*Share) GetHiddenUser

func (s *Share) GetHiddenUser() (*models.ShareEntry, bool)

func (*Share) GetListKey

func (s *Share) GetListKey() string

func (*Share) GetMetadata

func (s *Share) GetMetadata() *ShareMetadata

func (*Share) GetOwnerId

func (s *Share) GetOwnerId() string

func (*Share) GetPrelogUser

func (s *Share) GetPrelogUser() string

func (*Share) GetPresetLogin

func (s *Share) GetPresetLogin() string

func (*Share) GetSharedUsers

func (s *Share) GetSharedUsers() (entries []*models.ShareEntry)

func (*Share) GetSharedUsersIds

func (s *Share) GetSharedUsersIds() (ids []string)

func (*Share) GetTemplateName

func (s *Share) GetTemplateName() string

func (*Share) GetWorkspace

func (s *Share) GetWorkspace() (*models.AdminWorkspace, error)

func (*Share) LoadElement

func (s *Share) LoadElement() error

type ShareElement

type ShareElement struct {
	models.ShareElement
	// contains filtered or unexported fields
}

func NewElementFromModel

func NewElementFromModel(e *models.ShareElement) (*ShareElement, error)
func (s *ShareElement) GetLinks() map[string]*models.ShareLink

type ShareMetadata

type ShareMetadata struct {
	models.ShareMetadata
}

func NewMetaFromModel

func NewMetaFromModel(metadata *models.ShareMetadata) *ShareMetadata

NewFromModel creates a ShareMetadata from a parsed models.ShareMetadata

func (*ShareMetadata) GetNodeRelativePath

func (s *ShareMetadata) GetNodeRelativePath() string

GetNodeRelativePath returns original path inside parent repository

func (*ShareMetadata) GetParentRepositoryId

func (s *ShareMetadata) GetParentRepositoryId() string

GetParentRepositoryId returns SharedElementParentRepository as string

func (*ShareMetadata) GetParentRepositoryLabel

func (s *ShareMetadata) GetParentRepositoryLabel() string

GetParentRepositoryLabel returns SharedElementParentRepositoryLabel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL