MCPcopy Index your code
hub / github.com/lxc/incus / ObjectFromString

Function ObjectFromString

internal/server/auth/authorization_objects.go:235–243  ·  view source on GitHub ↗

ObjectFromString parses a string into an Object. It returns an error if the string is not valid.

(objectstr string)

Source from the content-addressed store, hash-verified

233
234// ObjectFromString parses a string into an Object. It returns an error if the string is not valid.
235func ObjectFromString(objectstr string) (Object, error) {
236 o := Object(objectstr)
237 err := o.validate()
238 if err != nil {
239 return "", err
240 }
241
242 return o, nil
243}
244
245// ObjectUser represents a user.
246func ObjectUser(userName string) Object {

Callers 3

TestObjectFromStringMethod · 0.85
TestRemakeMethod · 0.85
syncResourcesMethod · 0.85

Calls 2

ObjectTypeAlias · 0.85
validateMethod · 0.45

Tested by 2

TestObjectFromStringMethod · 0.68
TestRemakeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…