config

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Update(apiKey, apiHost string, segmentsToCheck []string) bool
	GetAPIKey() string
	GetAPIHost() string
	GetSegmentsToCheck() []string
	IsOdpServiceIntegrated() bool
}

Config is used to represent odp config

type DefaultConfig

type DefaultConfig struct {
	// contains filtered or unexported fields
}

DefaultConfig represents default implementation of odp config

func NewConfig

func NewConfig(apiKey, apiHost string, segmentsToCheck []string) *DefaultConfig

NewConfig creates and returns a new instance of DefaultConfig.

func (*DefaultConfig) GetAPIHost

func (s *DefaultConfig) GetAPIHost() string

GetAPIHost returns value for APIHost.

func (*DefaultConfig) GetAPIKey

func (s *DefaultConfig) GetAPIKey() string

GetAPIKey returns value for APIKey.

func (*DefaultConfig) GetSegmentsToCheck

func (s *DefaultConfig) GetSegmentsToCheck() []string

GetSegmentsToCheck returns an array of all ODP segments used in the current datafile (associated with apiHost/apiKey).

func (*DefaultConfig) IsOdpServiceIntegrated

func (s *DefaultConfig) IsOdpServiceIntegrated() bool

IsOdpServiceIntegrated returns true if odp service is integrated

func (*DefaultConfig) Update

func (s *DefaultConfig) Update(apiKey, apiHost string, segmentsToCheck []string) bool

Update updates config.

Jump to

Keyboard shortcuts

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