github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/client/ddl.templ (about)

     1  // generated code; DO NOT EDIT
     2  
     3  package {{ .Package }}
     4  
     5  import (
     6  	_ "embed"
     7  
     8  	"github.com/choria-io/go-choria/providers/agent/mcorpc/ddl/agent"
     9  )
    10  
    11  
    12  //go:embed ddl.json
    13  var rawDDL []byte
    14  
    15  // DDLBytes is the raw JSON encoded DDL file for the agent
    16  func DDLBytes() ([]byte, error) {
    17  	return rawDDL, nil
    18  }
    19  
    20  // DDL is a parsed and loaded DDL for the agent
    21  func DDL() (*agent.DDL, error) {
    22  	return agent.NewFromBytes(rawDDL)
    23  }