Skip to content

package content_opener

import "kaiju/editor/content/content_opener"

Variables

ErrNoOpener

errors.New("no opener found")

Types

ContentOpener

interface

type ContentOpener interface {
    Handles(adi asset_info.AssetDatabaseInfo) bool
    Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error
}

HTMLOpener

struct

type HTMLOpener struct{}

HTMLOpener.Handles

func (o HTMLOpener) Handles(adi asset_info.AssetDatabaseInfo) bool

HTMLOpener.Open

func (o HTMLOpener) Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error

ImageOpener

struct

type ImageOpener struct{}

ImageOpener.Handles

func (o ImageOpener) Handles(adi asset_info.AssetDatabaseInfo) bool

ImageOpener.Open

func (o ImageOpener) Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error

ObjOpener

struct

type ObjOpener struct{}

ObjOpener.Handles

func (o ObjOpener) Handles(adi asset_info.AssetDatabaseInfo) bool

ObjOpener.Open

func (o ObjOpener) Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error

Opener

struct

type Opener struct {
    // Has unexported fields.
}

New

func New(importer *asset_importer.ImportRegistry,

container host_container.Container, history memento.History) Opener

Opener.Open

func (o *Opener) Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error

Opener.OpenPath

func (o *Opener) OpenPath(path string, ed interfaces.Editor) error

Opener.Register

func (o *Opener) Register(opener ContentOpener)

StageOpener

struct

type StageOpener struct{}

StageOpener.Handles

func (o StageOpener) Handles(adi asset_info.AssetDatabaseInfo) bool

StageOpener.Open

func (o StageOpener) Open(adi asset_info.AssetDatabaseInfo, ed interfaces.Editor) error