func (s *pluginService) CreateTemplate(
	ctx context.Context,
	owner string,
	name string,
	visibility v1alpha1.PluginVisibility,
	pluginConfigs []*v1alpha1.PluginConfig,
) (template *v1alpha1.Template, _ error) {
	if s.contextModifier != nil {
		ctx = s.contextModifier(ctx)
	}
	response, err := s.client.CreateTemplate(
		ctx,
		&v1alpha1.CreateTemplateRequest{
			Owner:         owner,
			Name:          name,
			Visibility:    visibility,
			PluginConfigs: pluginConfigs,
		},
	)
	if err != nil {
		return nil, err
	}
	return response.Template, nil
}
// CreateTemplate creates a new template.
CreateTemplate creates a new template.
// CreateTemplate creates a new template .
func (s *pluginService) CreateTemplate(
	ctx context.Context,
	owner string,
	name string,
	visibility v1alpha1.PluginVisibility,
	pluginConfigs []*v1alpha1.PluginConfig,
) (template *v1alpha1.Template, _ error) {
	if s.contextModifier != nil {
		ctx = s.contextModifier(ctx)
	}
	response, err := s.client.CreateTemplate(
		ctx,
		&v1alpha1.CreateTemplateRequest{
			Owner:         owner,
			Name:          name,
			Visibility:    visibility,
			PluginConfigs: pluginConfigs,
		},
	)
	if err != nil {
		return nil, err
	}
	return response.Template, nil
}
func ( s * pluginService ) CreateTemplate ( ctx context . Context , owner string , name string , visibility v1alpha1 . PluginVisibility , pluginConfigs [ ] * v1alpha1 . PluginConfig , ) ( template * v1alpha1 . Template , _ error ) { if s . contextModifier != nil { ctx = s . contextModifier ( ctx ) } response , err := s . client . CreateTemplate ( ctx , & v1alpha1 . CreateTemplateRequest { Owner : owner , Name : name , Visibility : visibility , PluginConfigs : pluginConfigs , } , ) if err != nil { return nil , err } return response . Template , nil }
CreateTemplate creates a new template.
CreateTemplate creates a new template .