Documentation
¶
Index ¶
- func SetService(svc Service)
- type DefaultService
- func (*DefaultService) Delete(ctx context.ServiceContext, client *clients.GQLClient, options *DeleteOptions) (*dto.Secret, error)
- func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, options *GetOptions) (*dto.Secret, error)
- func (d *DefaultService) Init(ctx context.ServiceContext, client *clients.GQLClient, options *RemoteConfig) (*dto.Secret, error)
- func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) (*dto.KPMap, error)
- func (*DefaultService) Set(ctx context.ServiceContext, client *clients.GQLClient, secret *dto.Secret) error
- type DeleteOptions
- type GetOptions
- type ListOptions
- type RemoteConfig
- type Secret
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetService ¶
func SetService(svc Service)
Types ¶
type DefaultService ¶
type DefaultService struct{}
func (*DefaultService) Delete ¶
func (*DefaultService) Delete(ctx context.ServiceContext, client *clients.GQLClient, options *DeleteOptions) (*dto.Secret, error)
--- Flow ---
If the secret has a remote environment ID saved, then delete the values from the remote environment. Else, delete the values from the local environment.
func (*DefaultService) Get ¶
func (*DefaultService) Get(ctx context.ServiceContext, client *clients.GQLClient, options *GetOptions) (*dto.Secret, error)
--- Flow ---
If the secret has a remote environment ID saved, then get the values from the remote environment. Else, get the values from the local environment.
func (*DefaultService) Init ¶
func (d *DefaultService) Init(ctx context.ServiceContext, client *clients.GQLClient, options *RemoteConfig) (*dto.Secret, error)
func (*DefaultService) List ¶
func (*DefaultService) List(ctx context.ServiceContext, client *clients.GQLClient, options *ListOptions) (*dto.KPMap, error)
--- Flow ---
If the secret has a remote environment ID saved, then get the array of keys from the remote environment. Else, get the array of keys from the local environment.
func (*DefaultService) Set ¶
func (*DefaultService) Set(ctx context.ServiceContext, client *clients.GQLClient, secret *dto.Secret) error
--- Flow ---
If the secret has a remote environment ID saved, then set the values in the remote environment. Else, update the values in the local environment.
type DeleteOptions ¶
type GetOptions ¶
type ListOptions ¶
type RemoteConfig ¶
type Secret ¶
func (*Secret) IsRemote ¶
Returns a boolean response subject to whether or not the secret has a non-empty environment ID.
func (*Secret) UnmarshalJSON ¶
Custom unmarsaller for the Secret struct.
type Service ¶
type Service interface { Init(context.ServiceContext, *clients.GQLClient, *RemoteConfig) (*dto.Secret, error) Set(context.ServiceContext, *clients.GQLClient, *dto.Secret) error Get(context.ServiceContext, *clients.GQLClient, *GetOptions) (*dto.Secret, error) List(context.ServiceContext, *clients.GQLClient, *ListOptions) (*dto.KPMap, error) Delete(context.ServiceContext, *clients.GQLClient, *DeleteOptions) (*dto.Secret, error) }
func GetService ¶
func GetService() Service