github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/engine/template.go (about) 1 // Copyright 2015 Keybase, Inc. All rights reserved. Use of 2 // this source code is governed by the included BSD license. 3 4 //go:build ignore 5 // +build ignore 6 7 // 8 // This is a template for an engine. 9 // 10 // It won't be built, but can be used as a starting point for new 11 // engines. 12 13 package engine 14 15 import ( 16 "github.com/keybase/client/go/libkb" 17 ) 18 19 // Template is an engine. 20 type Template struct { 21 libkb.Contextified 22 } 23 24 // NewTemplate creates a Template engine. 25 func NewTemplate(g *libkb.GlobalContext) *Template { 26 return &Template{ 27 Contextified: libkb.NewContextified(g), 28 } 29 } 30 31 // Name is the unique engine name. 32 func (e *Template) Name() string { 33 return "Template" 34 } 35 36 // GetPrereqs returns the engine prereqs. 37 func (e *Template) Prereqs() Prereqs { 38 return Prereqs{} 39 } 40 41 // RequiredUIs returns the required UIs. 42 func (e *Template) RequiredUIs() []libkb.UIKind { 43 return []libkb.UIKind{} 44 } 45 46 // SubConsumers returns the other UI consumers for this engine. 47 func (e *Template) SubConsumers() []libkb.UIConsumer { 48 return nil 49 } 50 51 // Run starts the engine. 52 func (e *Template) Run(ctx *Context) error { 53 panic("Run not yet implemented") 54 }