service

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016, Fitbit, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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 DefaultAuthService

type DefaultAuthService struct {
	Client *resty.Client `inject:"DefaultRestClient"`
}

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 {
	Client *resty.Client `inject:"DefaultRestClient"`
}

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