factory

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

	Copyright © 2022 Tidal Control opensource@tidalcontrol.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

	Copyright © 2022 Tidal Control opensource@tidalcontrol.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

	Copyright © 2022 Tidal Control opensource@tidalcontrol.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

	Copyright © 2022 Tidal Control opensource@tidalcontrol.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Organisation *string  `validate:"required,min=1"`
	ClientId     *string  `validate:"required,min=1"`
	ClientSecret *string  `validate:"required,min=1"`
	AuthUrl      *url.URL `validate:"required,url,min=1"`
	ApiUrl       *url.URL `validate:"required,url,min=1"`
	Encoding     *string  `validate:"required,oneof=json yaml"`
}

type Factory

type Factory struct {
	Config *Config
	Client func() (*tidalcontrol.Client, error)
	IO     func(cmd *cobra.Command) (*IO, error)
}

func GetInstance

func GetInstance() (*Factory, error)

func (*Factory) NewConfig

func (f *Factory) NewConfig(cmd *cobra.Command) error

type IO

type IO struct {
	Writer   io.Writer
	Encoding *string
	Query    *string
}

func (*IO) Write

func (io *IO) Write(output interface{}) error

Jump to

Keyboard shortcuts

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