Documentation ¶
Overview ¶
Copyright © 2021 David Muckle <dvdmuckle@dvdmuckle.xyz>
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 © 2021 David Muckle <dvdmuckle@dvdmuckle.xyz>
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 © 2021 David Muckle <dvdmuckle@dvdmuckle.xyz>
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 © 2021 David Muckle <dvdmuckle@dvdmuckle.xyz>
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 © 2021 David Muckle <dvdmuckle@dvdmuckle.xyz>
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 ¶
- func Auth(cmd *cobra.Command, cfgFile string, conf *Config)
- func CreateConfig(cfgFile string)
- func GetVerboseErrLogAddr() *bool
- func LogErrorAndExit(args ...interface{})
- func Pause(conf *Config)
- func Play(conf *Config)
- func RefreshToken(client string, secret string, refreshToken string) *oauth2.Token
- func SetClient(conf *Config)
- func SetupConfig() string
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfig ¶ added in v0.5.1
func CreateConfig(cfgFile string)
CreateConfig initializes a skeleton config
func GetVerboseErrLogAddr ¶ added in v1.1.0
func GetVerboseErrLogAddr() *bool
func LogErrorAndExit ¶ added in v1.1.0
func LogErrorAndExit(args ...interface{})
func Pause ¶
func Pause(conf *Config)
Pause wraps the spotify.Client.Pause() method for easy error checking
func Play ¶
func Play(conf *Config)
Play wraps the spotify.Client.Play() method for easy error checking
func RefreshToken ¶
RefreshToken refreshes the auth token from Spotify
func SetClient ¶
func SetClient(conf *Config)
SetClient sets the Client field of Config struct to a valid Spotify client The Token field in the Config struct must be set
func SetupConfig ¶ added in v0.5.1
func SetupConfig() string
SetupConfig sets up the path and type of the config for Viper and also returns the full path to the config