Documentation ¶
Index ¶
- Variables
- func NewHTTPService(listenAddress string, executor *Executor, snippetStore storage.SnippetStore) *httpService
- func StringToArgs(args string) ([]string, error)
- type ErrorResponse
- type ExecuteArgs
- type ExecuteRequest
- type ExecuteResponse
- type Executor
- type GetSnippetResponse
- type RestrictedArgErr
- type SaveSnippetRequest
- type SaveSnippetResponse
- type VersionOpts
- type VersionsResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidVersion = errors.New("invalid dasel version")
)
View Source
var (
ErrMissingSnippet = errors.New("missing snippet")
)
View Source
var (
ErrMissingSnippetID = errors.New("missing snippet id")
)
Functions ¶
func NewHTTPService ¶
func NewHTTPService(listenAddress string, executor *Executor, snippetStore storage.SnippetStore) *httpService
NewHTTPService returns a service that can be used to start a http server that will generate diagrams.
func StringToArgs ¶ added in v0.1.7
StringToArgs converts the given string into a list of arguments.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error error `json:"error"`
}
func (ErrorResponse) MarshalJSON ¶ added in v0.1.0
func (r ErrorResponse) MarshalJSON() ([]byte, error)
type ExecuteArgs ¶
ExecuteArgs define the opts to use when executing dasel commands.
type ExecuteRequest ¶
type ExecuteResponse ¶
type ExecuteResponse struct {
Data string `json:"data"`
}
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(snippetStore storage.SnippetStore) *Executor
NewExecutor returns an executor that can be used to run dasel commands.
func (*Executor) Execute ¶
func (e *Executor) Execute(args ExecuteArgs) (result string, daselErr error, validationErr error, err error)
Execute executes a dasel command.
func (*Executor) RegisterVersion ¶
func (e *Executor) RegisterVersion(v *VersionOpts)
type GetSnippetResponse ¶ added in v0.1.0
type RestrictedArgErr ¶ added in v0.1.0
type RestrictedArgErr struct {
Arg string
}
func (*RestrictedArgErr) Error ¶ added in v0.1.0
func (e *RestrictedArgErr) Error() string
type SaveSnippetRequest ¶ added in v0.1.0
type SaveSnippetResponse ¶ added in v0.1.0
type VersionOpts ¶
VersionOpts defines options for a specific dasel version.
type VersionsResponse ¶
type VersionsResponse struct {
Versions []string `json:"versions"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.