func (r *Request) Validate() error {
	if r.Target == nil {
		return errors.New("target host was nil")
	}
	if r.AppName == "" {
		return errors.New("app name was empty")
	}
	return nil
}
Validate check if request is valid otherwise returns error.
package deploy
import (
	"errors"
	"fmt"
	"github.com/viant/endly"
	"github.com/viant/endly/model"
	"github.com/viant/endly/system/exec"
	"github.com/viant/endly/system/storage/copy"
	"github.com/viant/toolbox/url"
)
type Request struct {
	Target       *url.Resource `required:"true" description:"target host"`                                                                                    
	MetaURL      string        `description:"optional URL for meta deployment file, if left empty the meta URL is construct as meta/deployment/**AppName**"`  
	AppName      string        `required:"true" description:"application name, as defined in meta deployment file"`                                           
	Version      string        `description:"min required version, it can be 1, or 1.2 or specific version 1.2.1"`                                            
	Force        bool          `description:"force deployment even if app has been already installed"`                                                        
	BaseLocation string        `description:" variable source: $deploy.baseLocation"`
}
func (r *Request) Expand(context *endly.Context) *Request {
	expanded := &Request{
		AppName:      context.Expand(r.AppName),
		Version:      context.Expand(r.Version),
		BaseLocation: r.BaseLocation,
		Target:       r.Target,
		Force:        r.Force,
		MetaURL:      context.Expand(r.MetaURL),
	}
	if target, err := context.ExpandResource(r.Target); err != nil {
		expanded.Target = target
	}
	return expanded
}
func (r *Request) Init() error {
	r.Target = exec.GetServiceTarget(r.Target)
	return nil
}