MCPcopy Create free account
hub / github.com/Permify/permify / Run

Method Run

pkg/development/development.go:114–139  ·  view source on GitHub ↗
(ctx context.Context, shape map[string]interface{})

Source from the content-addressed store, hash-verified

112}
113
114func (c *Development) Run(ctx context.Context, shape map[string]interface{}) (errors []Error) {
115 // Marshal the shape map into YAML format
116 out, err := yaml.Marshal(shape)
117 if err != nil {
118 errors = append(errors, Error{
119 Type: "file_validation",
120 Key: "",
121 Message: err.Error(),
122 })
123 return errors
124 }
125
126 // Unmarshal the YAML data into a file.Shape object
127 s := &file.Shape{}
128 err = yaml.Unmarshal(out, &s)
129 if err != nil {
130 errors = append(errors, Error{
131 Type: "file_validation",
132 Key: "",
133 Message: err.Error(),
134 })
135 return errors
136 }
137
138 return c.RunWithShape(ctx, s)
139}
140
141func (c *Development) RunWithShape(ctx context.Context, shape *file.Shape) (errors []Error) {
142 // Parse the schema using the parser library

Callers 4

TestConstsFunction · 0.45
TestNewPaginationFunction · 0.45
TestNewCursorPaginationFunction · 0.45
runFunction · 0.45

Calls 2

RunWithShapeMethod · 0.95
ErrorMethod · 0.45

Tested by 3

TestConstsFunction · 0.36
TestNewPaginationFunction · 0.36
TestNewCursorPaginationFunction · 0.36