libraries

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

libraries models represent and manipulate libraries within a Galaxy instance Relevant api endpoints are: `/api/libraries`

Index

Constants

View Source
const BasePath = "/api/libraries"

Variables

This section is empty.

Functions

This section is empty.

Types

type Library

type Library struct {
	Id               blend4go.GalaxyID `json:"id,omitempty"`
	Deleted          bool              `json:"deleted,omitempty"`
	Name             string            `json:"name,omitempty"`
	Description      string            `json:"description,omitempty"`
	Synopsis         string            `json:"synopsis,omitempty"`
	RootFolderId     blend4go.GalaxyID `json:"root_folder_id,omitempty"`
	CreateTime       string            `json:"create_time,omitempty"`
	Public           bool              `json:"public,omitempty"`
	CreateTimePretty string            `json:"create_time_pretty,omitempty"`
	CanUserAdd       bool              `json:"can_user_add,omitempty"`
	CanUserModify    bool              `json:"can_user_modify,omitempty"`
	CanUserManage    bool              `json:"can_user_manage,omitempty"`
	ModelClass       string            `json:"model_class,omitempty"`
	// contains filtered or unexported fields
}

func Get

returns detailed information about a library

func List

func List(ctx context.Context, g *blend4go.GalaxyInstance, deleted bool) ([]*Library, error)

Returns a list of summary data for all libraries

func NewLibrary

func NewLibrary(ctx context.Context, g *blend4go.GalaxyInstance, name, description, synopsis string) (*Library, error)

Creates a new library.

func (*Library) Contents

func (l *Library) Contents(ctx context.Context) ([]*LibraryItem, error)

Return a list of library files and folders.

func (*Library) Delete

func (l *Library) Delete(ctx context.Context) error

marks the library with the given id as deleted

func (*Library) GetBasePath

func (l *Library) GetBasePath() string

func (*Library) GetID

func (l *Library) GetID() blend4go.GalaxyID

func (*Library) Permissions

func (l *Library) Permissions(ctx context.Context) (*LibraryPermissions, error)

Load all permissions for the given library id and return it.

func (*Library) SetGalaxyInstance

func (l *Library) SetGalaxyInstance(g *blend4go.GalaxyInstance)

func (*Library) SetID

func (l *Library) SetID(id blend4go.GalaxyID)

func (*Library) SetPermissions

func (l *Library) SetPermissions(ctx context.Context, permissions *LibraryPermissions) error

Set permissions of the given library to the given role ids.

func (*Library) Undelete

func (l *Library) Undelete(ctx context.Context) error

marks the library with the given id as not deleted

func (*Library) Update

func (l *Library) Update(ctx context.Context) error

Updates the library defined by an encoded_id with the data in the payload.

type LibraryItem

type LibraryItem struct {
	Id   blend4go.GalaxyID `json:"id"`
	Name string            `json:"name"`
	Type string            `json:"type"`
	Url  string            `json:"url"`
	// contains filtered or unexported fields
}

type LibraryPermissions

type LibraryPermissions struct {
	AccessLibraryRoleList  []*roles.Role
	ModifyLibraryRoleList  []*roles.Role
	ManageLibraryRoleList  []*roles.Role
	AddLibraryItemRoleList []*roles.Role
}

Jump to

Keyboard shortcuts

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