service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2016 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Authenticate(userToken *model.UserToken) (*model.AuthToken, error)

	Refresh(refreshToken string) (*model.AuthToken, error)
}

type Container

type Container struct {
	ProjectConfigService ProjectConfigService `inject:"DefaultProjectConfigService"`
	AuthService          AuthService          `inject:"DefaultAuthService"`
	FileService          FileService          `inject:"DefaultFileService"`
}

func (*Container) SetUp

func (c *Container) SetUp(filename string) error

type DefaultAuthService

type DefaultAuthService struct{}

func (*DefaultAuthService) Authenticate

func (s *DefaultAuthService) Authenticate(userToken *model.UserToken) (*model.AuthToken, error)

func (*DefaultAuthService) Refresh

func (s *DefaultAuthService) Refresh(refreshToken string) (*model.AuthToken, error)

type DefaultFileService

type DefaultFileService struct{}

func (*DefaultFileService) Pull

func (s *DefaultFileService) Pull(params *FilePullParams) ([]*model.File, error)

func (*DefaultFileService) Push

func (s *DefaultFileService) Push(params *FilePushParams) (*model.FileStats, error)

type DefaultProjectConfigService

type DefaultProjectConfigService struct {
	ProjectConfigRepository repository.ProjectConfigRepository `inject:"YmlProjectConfigRepository"`
}

func (*DefaultProjectConfigService) GetConfig

func (*DefaultProjectConfigService) UpdateConfig

func (s *DefaultProjectConfigService) UpdateConfig(delta *model.ProjectConfig) error

type FilePullParams

type FilePullParams struct {
	ProjectID              string   `url:"-"`
	FileURIs               []string `url:"fileUris,brackets"`
	LocaleIDs              []string `url:"localeIds,brackets"`
	RetrievalType          string   `url:"retrievalType,omitempty"`
	IncludeOriginalStrings bool     `url:"includeOriginalStrings,omitempty"`
	AuthToken              string   `url:"-"`
}

type FilePushParams

type FilePushParams struct {
	ProjectID  string            `url:"-"`
	FileURI    string            `url:"fileUri"`
	FilePath   string            `url:"-"`
	FileType   string            `url:"fileType"`
	Authorize  bool              `url:"authorize,omitempty"`
	Directives map[string]string `url:"-"`
	AuthToken  string            `url:"-"`
}

type FileService

type FileService interface {
	Pull(*FilePullParams) ([]*model.File, error)

	Push(*FilePushParams) (*model.FileStats, error)
}

type ProjectConfigService

type ProjectConfigService interface {
	GetConfig() (*model.ProjectConfig, error)

	UpdateConfig(*model.ProjectConfig) error
}

Jump to

Keyboard shortcuts

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