Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ForcePublishTemplate(ctx context.Context, template *Template) (*Template, error)
- func (c *Client) GetRemoteConfig(versionNumber string) (*Response, error)
- func (c *Client) GetTemplate(ctx context.Context) (*Template, error)
- func (c *Client) GetTemplateAtVersion(ctx context.Context, versionNumber string) (*Template, error)
- func (c *Client) ListVersions(options *ListVersionsOptions) (*ListVersionsResponse, error)
- func (c *Client) PublishTemplate(ctx context.Context, template Template, validateOnly bool) (*Template, error)
- func (c *Client) Rollback(ctx context.Context, versionNumber string) (*Template, error)
- func (c *Client) UpdateRemoteConfig(eTag string, validateOnly bool) (*Response, error)
- func (c *Client) ValidateTemplate(ctx context.Context, template *Template) (*Template, error)
- func (c *Client) Versions(ctx context.Context, options *ListVersionsOptions) (*VersionIterator, error)
- type Condition
- type ListVersionsOptions
- type ListVersionsResponse
- type Parameter
- type ParameterGroup
- type ParameterValue
- type RemoteConfig
- type Response
- type TagColor
- type Template
- type User
- type Version
- type VersionIterator
Constants ¶
const ( Blue = "BLUE" Brown = "BROWN" Cyan = "CYAN" DeepOrange = "DEEPORANGE" Green = "GREEN" Indigo = "INDIGO" Lime = "LIME" Orange = "ORANGE" Pink = "PINK" Purple = "PURPLE" Teal = "TEAL" )
Tag colors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client .
func (*Client) ForcePublishTemplate ¶
ForcePublishTemplate will publish the template irrespective of the outcome from validations
func (*Client) GetRemoteConfig ¶
GetRemoteConfig https://firebase.google.com/docs/reference/remote-config/rest/v1/projects/getRemoteConfig
func (*Client) GetTemplate ¶
GetTemplate will retrieve the latest template
func (*Client) GetTemplateAtVersion ¶
GetTemplateAtVersion will retrieve the specified version of the template
func (*Client) ListVersions ¶
func (c *Client) ListVersions(options *ListVersionsOptions) (*ListVersionsResponse, error)
ListVersions https://firebase.google.com/docs/reference/remote-config/rest/v1/projects.remoteConfig/listVersions
func (*Client) PublishTemplate ¶
func (c *Client) PublishTemplate(ctx context.Context, template Template, validateOnly bool) (*Template, error)
PublishTemplate will publish the specified template
func (*Client) Rollback ¶
Rollback will perform a rollback operation on the template https://firebase.google.com/docs/reference/remote-config/rest/v1/projects.remoteConfig/rollback
func (*Client) UpdateRemoteConfig ¶
UpdateRemoteConfig https://firebase.google.com/docs/reference/remote-config/rest/v1/projects/updateRemoteConfig
func (*Client) ValidateTemplate ¶
ValidateTemplate will run validations for the current template
func (*Client) Versions ¶
func (c *Client) Versions(ctx context.Context, options *ListVersionsOptions) (*VersionIterator, error)
Versions will list the versions of the template
type Condition ¶
type Condition struct { Expression string `json:"expression"` Name string `json:"name"` TagColor TagColor `json:"tagColor"` }
Condition targets a specific group of users A list of these conditions make up part of a Remote Config template
type ListVersionsOptions ¶
type ListVersionsOptions struct { StartTime time.Time EndTime time.Time EndVersionNumber string PageSize int PageToken string }
ListVersionsOptions to be used as query params in the request to list versions
type ListVersionsResponse ¶
type ListVersionsResponse struct { NextPageToken string `json:"nextPageToken"` Versions []Version `json:"versions"` }
ListVersionsResponse is a list of Remote Config template versions
type Parameter ¶
type Parameter struct { ConditionalValues map[string]*ParameterValue `json:"conditionalValues"` DefaultValue *ParameterValue `json:"defaultValue"` Description string `json:"description"` }
Parameter .
type ParameterGroup ¶
type ParameterGroup struct { Description string `json:"description"` Parameters map[string]*Parameter `json:"parameters"` }
ParameterGroup representing a Remote Config parameter group Grouping parameters is only for management purposes and does not affect client-side fetching of parameter values
type ParameterValue ¶
type ParameterValue struct { ExplicitValue string `json:"value"` UseInAppDefault bool `json:"useInAppDefault,omitempty"` }
ParameterValue .
func NewExplicitParameterValue ¶
func NewExplicitParameterValue(value string) *ParameterValue
NewExplicitParameterValue will add a new explicit parameter value
func UseInAppDefaultValue ¶
func UseInAppDefaultValue() *ParameterValue
UseInAppDefaultValue returns a parameter value with the in app default as false
type RemoteConfig ¶
type RemoteConfig struct { Conditions []Condition `json:"conditions"` Parameters map[string]Parameter `json:"parameters"` Version Version `json:"version"` ParameterGroups map[string]ParameterGroup `json:"parameterGroups"` }
RemoteConfig represents a Remote Config
func (*RemoteConfig) Bytes ¶ added in v4.8.1
func (t *RemoteConfig) Bytes() ([]byte, error)
func (*RemoteConfig) Mime ¶ added in v4.8.1
func (t *RemoteConfig) Mime() string
type Response ¶
type Response struct { *RemoteConfig Etag string `json:"etag"` }
Response to save the API response including ETag
type Template ¶
type Template struct { Conditions []Condition ETag string Parameters map[string]Parameter ParameterGroups map[string]ParameterGroup Version Version }
Template .
type User ¶
type User struct { Email string `json:"email"` ImageURL string `json:"imageUrl"` Name string `json:"name"` }
User represents a remote config user
type Version ¶
type Version struct { Description string `json:"description"` IsLegacy bool `json:"isLegacy"` RollbackSource int64 `json:"rollbackSource"` UpdateOrigin string `json:"updateOrigin"` UpdateTime time.Time `json:"updateTime"` UpdateType string `json:"updateType"` UpdateUser *User `json:"updateUser"` VersionNumber int64 `json:"versionNumber,string"` }
Version a Remote Config template version. Output only, except for the version description. Contains metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template is published. A version's description field may be specified in PublishTemplate calls
type VersionIterator ¶
type VersionIterator struct{}
VersionIterator represents the iterator for looping over versions
func (*VersionIterator) Next ¶
func (it *VersionIterator) Next() (*Version, error)
Next will return the next version item in the loop
func (*VersionIterator) PageInfo ¶
func (it *VersionIterator) PageInfo() *iterator.PageInfo
PageInfo represents the information about a Page