uploader

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RulesAPICaller

type RulesAPICaller interface {
	CreateRuleRequest(ctx context.Context, localVarOptionals *client.RulesApiCreateRuleRequestOpts) (client.Rule, *http.Response, error)
	ListRulesRequest(ctx context.Context, localVarOptionals *client.RulesApiListRulesRequestOpts) ([]client.Rule, *http.Response, error)
}

type Service

type Service struct {
	SirenClient *SirenClient
}

Service talks to siren's HTTP Client

func NewService

func NewService(c *domain.SirenServiceConfig) *Service

func (Service) Upload

func (s Service) Upload(fileName string) (interface{}, error)

func (Service) UploadRules

func (s Service) UploadRules(yamlFile []byte) ([]*client.Rule, error)

func (Service) UploadTemplates

func (s Service) UploadTemplates(yamlFile []byte) (*client.Template, error)

type SirenClient

type SirenClient struct {
	RulesAPI     RulesAPICaller
	TemplatesAPI TemplatesAPICaller
	// contains filtered or unexported fields
}

func NewSirenClient

func NewSirenClient(host string) *SirenClient

type TemplatesAPICaller

type TemplatesAPICaller interface {
	CreateTemplateRequest(ctx context.Context, localVarOptionals *client.TemplatesApiCreateTemplateRequestOpts) (client.Template, *http.Response, error)
}

type Uploader

type Uploader interface {
	Upload(string) (interface{}, error)
	UploadTemplates([]byte) (client.Template, error)
	UploadRules([]byte) ([]*client.Rule, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL