@@ -3,7 +3,6 @@ package api
33import (
44 "context"
55 "encoding/json"
6- "github.com/reddec/trusted-cgi/application"
76 "github.com/reddec/trusted-cgi/stats"
87 "github.com/reddec/trusted-cgi/types"
98)
@@ -63,9 +62,9 @@ type LambdaAPI interface {
6362 // Files in func dir
6463 Files (ctx context.Context , token * Token , uid string , dir string ) ([]* File , error )
6564 // Info about application
66- Info (ctx context.Context , token * Token , uid string ) (* application .App , error )
65+ Info (ctx context.Context , token * Token , uid string ) (* types .App , error )
6766 // Update application manifest
68- Update (ctx context.Context , token * Token , uid string , manifest types.Manifest ) (* application .App , error )
67+ Update (ctx context.Context , token * Token , uid string , manifest types.Manifest ) (* types .App , error )
6968 // Create file or directory inside app
7069 CreateFile (ctx context.Context , token * Token , uid string , path string , dir bool ) (bool , error )
7170 // Remove file or directory
@@ -79,9 +78,9 @@ type LambdaAPI interface {
7978 // Invoke action in the app (if make installed)
8079 Invoke (ctx context.Context , token * Token , uid string , action string ) (string , error )
8180 // Make link/alias for app
82- Link (ctx context.Context , token * Token , uid string , alias string ) (* application .App , error )
81+ Link (ctx context.Context , token * Token , uid string , alias string ) (* types .App , error )
8382 // Remove link
84- Unlink (ctx context.Context , token * Token , alias string ) (* application .App , error )
83+ Unlink (ctx context.Context , token * Token , alias string ) (* types .App , error )
8584}
8685
8786// API for global project
@@ -95,17 +94,17 @@ type ProjectAPI interface {
9594 // Get all templates without filtering
9695 AllTemplates (ctx context.Context , token * Token ) ([]* TemplateStatus , error )
9796 // List available apps (lambdas) in a project
98- List (ctx context.Context , token * Token ) ([]* application .App , error )
97+ List (ctx context.Context , token * Token ) ([]* types .App , error )
9998 // Templates with filter by availability including embedded
10099 Templates (ctx context.Context , token * Token ) ([]* Template , error )
101100 // Global last records
102101 Stats (ctx context.Context , token * Token , limit int ) ([]stats.Record , error )
103102 // Create new app (lambda)
104- Create (ctx context.Context , token * Token ) (* application .App , error )
103+ Create (ctx context.Context , token * Token ) (* types .App , error )
105104 // Create new app/lambda/function using pre-defined template
106- CreateFromTemplate (ctx context.Context , token * Token , templateName string ) (* application .App , error )
105+ CreateFromTemplate (ctx context.Context , token * Token , templateName string ) (* types .App , error )
107106 // Create new app/lambda/function using remote Git repo
108- CreateFromGit (ctx context.Context , token * Token , repo string ) (* application .App , error )
107+ CreateFromGit (ctx context.Context , token * Token , repo string ) (* types .App , error )
109108}
110109
111110// User/admin profile API
0 commit comments