-
Notifications
You must be signed in to change notification settings - Fork 9
/
types.go
26 lines (20 loc) · 861 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2022 Namespace Labs Inc; All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
package entity
import (
"context"
"google.golang.org/protobuf/proto"
"namespacelabs.dev/foundation/internal/frontend/fncue"
"namespacelabs.dev/foundation/internal/parsing"
"namespacelabs.dev/foundation/schema"
"namespacelabs.dev/foundation/std/pkggraph"
)
type EntityParser interface {
// For example, "namespace.so/from-dockerfile"
Url() string
// Shortcut for "kind", for example, "docker"
Shortcut() string
// "v" is nil if the user used the shortest syntactic form. Example: `integration: "golang"`
Parse(ctx context.Context, env *schema.Environment, pl parsing.EarlyPackageLoader, loc pkggraph.Location, v *fncue.CueV) (proto.Message, error)
}