Documentation ¶
Overview ¶
Package config provides access to the Configuration Service.
Creating a client ¶
Usage example:
import "go.chromium.org/luci/common/api/luci_config/config/v1" ... ctx := context.Background() configService, err := config.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
configService, err := config.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) configService, err := config.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type ComponentsConfigEndpointValidationMessage
- type GetConfigByHashCall
- func (c *GetConfigByHashCall) Context(ctx context.Context) *GetConfigByHashCall
- func (c *GetConfigByHashCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigByHashResponseMessage, error)
- func (c *GetConfigByHashCall) Fields(s ...googleapi.Field) *GetConfigByHashCall
- func (c *GetConfigByHashCall) Header() http.Header
- func (c *GetConfigByHashCall) IfNoneMatch(entityTag string) *GetConfigByHashCall
- type GetConfigCall
- func (c *GetConfigCall) Context(ctx context.Context) *GetConfigCall
- func (c *GetConfigCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigResponseMessage, error)
- func (c *GetConfigCall) Fields(s ...googleapi.Field) *GetConfigCall
- func (c *GetConfigCall) HashOnly(hashOnly bool) *GetConfigCall
- func (c *GetConfigCall) Header() http.Header
- func (c *GetConfigCall) IfNoneMatch(entityTag string) *GetConfigCall
- func (c *GetConfigCall) Revision(revision string) *GetConfigCall
- type GetConfigSetsCall
- func (c *GetConfigSetsCall) ConfigSet(configSet string) *GetConfigSetsCall
- func (c *GetConfigSetsCall) Context(ctx context.Context) *GetConfigSetsCall
- func (c *GetConfigSetsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigSetsResponseMessage, error)
- func (c *GetConfigSetsCall) Fields(s ...googleapi.Field) *GetConfigSetsCall
- func (c *GetConfigSetsCall) Header() http.Header
- func (c *GetConfigSetsCall) IfNoneMatch(entityTag string) *GetConfigSetsCall
- func (c *GetConfigSetsCall) IncludeFiles(includeFiles bool) *GetConfigSetsCall
- func (c *GetConfigSetsCall) IncludeLastImportAttempt(includeLastImportAttempt bool) *GetConfigSetsCall
- type GetMappingCall
- func (c *GetMappingCall) ConfigSet(configSet string) *GetMappingCall
- func (c *GetMappingCall) Context(ctx context.Context) *GetMappingCall
- func (c *GetMappingCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetMappingResponseMessage, error)
- func (c *GetMappingCall) Fields(s ...googleapi.Field) *GetMappingCall
- func (c *GetMappingCall) Header() http.Header
- func (c *GetMappingCall) IfNoneMatch(entityTag string) *GetMappingCall
- type GetProjectConfigsCall
- func (c *GetProjectConfigsCall) Context(ctx context.Context) *GetProjectConfigsCall
- func (c *GetProjectConfigsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigMultiResponseMessage, error)
- func (c *GetProjectConfigsCall) Fields(s ...googleapi.Field) *GetProjectConfigsCall
- func (c *GetProjectConfigsCall) HashesOnly(hashesOnly bool) *GetProjectConfigsCall
- func (c *GetProjectConfigsCall) Header() http.Header
- func (c *GetProjectConfigsCall) IfNoneMatch(entityTag string) *GetProjectConfigsCall
- type GetProjectsCall
- func (c *GetProjectsCall) Context(ctx context.Context) *GetProjectsCall
- func (c *GetProjectsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetProjectsResponseMessage, error)
- func (c *GetProjectsCall) Fields(s ...googleapi.Field) *GetProjectsCall
- func (c *GetProjectsCall) Header() http.Header
- func (c *GetProjectsCall) IfNoneMatch(entityTag string) *GetProjectsCall
- type GetRefConfigsCall
- func (c *GetRefConfigsCall) Context(ctx context.Context) *GetRefConfigsCall
- func (c *GetRefConfigsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigMultiResponseMessage, error)
- func (c *GetRefConfigsCall) Fields(s ...googleapi.Field) *GetRefConfigsCall
- func (c *GetRefConfigsCall) HashesOnly(hashesOnly bool) *GetRefConfigsCall
- func (c *GetRefConfigsCall) Header() http.Header
- func (c *GetRefConfigsCall) IfNoneMatch(entityTag string) *GetRefConfigsCall
- type GetRefsCall
- func (c *GetRefsCall) Context(ctx context.Context) *GetRefsCall
- func (c *GetRefsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetRefsResponseMessage, error)
- func (c *GetRefsCall) Fields(s ...googleapi.Field) *GetRefsCall
- func (c *GetRefsCall) Header() http.Header
- func (c *GetRefsCall) IfNoneMatch(entityTag string) *GetRefsCall
- type LuciConfigConfigSet
- type LuciConfigConfigSetImportAttempt
- type LuciConfigFile
- type LuciConfigGetConfigByHashResponseMessage
- type LuciConfigGetConfigMultiResponseMessage
- type LuciConfigGetConfigMultiResponseMessageConfigEntry
- type LuciConfigGetConfigResponseMessage
- type LuciConfigGetConfigSetsResponseMessage
- type LuciConfigGetMappingResponseMessage
- type LuciConfigGetMappingResponseMessageMapping
- type LuciConfigGetProjectsResponseMessage
- type LuciConfigGetRefsResponseMessage
- type LuciConfigGetRefsResponseMessageRef
- type LuciConfigProject
- type LuciConfigRevision
- type LuciConfigValidateConfigRequestMessage
- type LuciConfigValidateConfigRequestMessageFile
- type LuciConfigValidateConfigResponseMessage
- type ReimportCall
- type Service
- func (s *Service) GetConfig(configSet string, path string) *GetConfigCall
- func (s *Service) GetConfigByHash(contentHash string) *GetConfigByHashCall
- func (s *Service) GetConfigSets() *GetConfigSetsCall
- func (s *Service) GetMapping() *GetMappingCall
- func (s *Service) GetProjectConfigs(path string) *GetProjectConfigsCall
- func (s *Service) GetProjects() *GetProjectsCall
- func (s *Service) GetRefConfigs(path string) *GetRefConfigsCall
- func (s *Service) GetRefs(projectId string) *GetRefsCall
- func (s *Service) Reimport(configSet string) *ReimportCall
- func (s *Service) ValidateConfig(luciconfigvalidateconfigrequestmessage *LuciConfigValidateConfigRequestMessage) *ValidateConfigCall
- type ValidateConfigCall
- func (c *ValidateConfigCall) Context(ctx context.Context) *ValidateConfigCall
- func (c *ValidateConfigCall) Do(opts ...googleapi.CallOption) (*LuciConfigValidateConfigResponseMessage, error)
- func (c *ValidateConfigCall) Fields(s ...googleapi.Field) *ValidateConfigCall
- func (c *ValidateConfigCall) Header() http.Header
Constants ¶
const (
// https://www.googleapis.com/auth/userinfo.email
UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentsConfigEndpointValidationMessage ¶
type ComponentsConfigEndpointValidationMessage struct { Path string `json:"path,omitempty"` // Possible values: // "CRITICAL" // "DEBUG" // "ERROR" // "INFO" // "WARNING" Severity string `json:"severity,omitempty"` Text string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Path") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*ComponentsConfigEndpointValidationMessage) MarshalJSON ¶
func (s *ComponentsConfigEndpointValidationMessage) MarshalJSON() ([]byte, error)
type GetConfigByHashCall ¶
type GetConfigByHashCall struct {
// contains filtered or unexported fields
}
func (*GetConfigByHashCall) Context ¶
func (c *GetConfigByHashCall) Context(ctx context.Context) *GetConfigByHashCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetConfigByHashCall) Do ¶
func (c *GetConfigByHashCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigByHashResponseMessage, error)
Do executes the "config.get_config_by_hash" call. Exactly one of *LuciConfigGetConfigByHashResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetConfigByHashResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetConfigByHashCall) Fields ¶
func (c *GetConfigByHashCall) Fields(s ...googleapi.Field) *GetConfigByHashCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetConfigByHashCall) Header ¶
func (c *GetConfigByHashCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetConfigByHashCall) IfNoneMatch ¶
func (c *GetConfigByHashCall) IfNoneMatch(entityTag string) *GetConfigByHashCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type GetConfigCall ¶
type GetConfigCall struct {
// contains filtered or unexported fields
}
func (*GetConfigCall) Context ¶
func (c *GetConfigCall) Context(ctx context.Context) *GetConfigCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetConfigCall) Do ¶
func (c *GetConfigCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigResponseMessage, error)
Do executes the "config.get_config" call. Exactly one of *LuciConfigGetConfigResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetConfigResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetConfigCall) Fields ¶
func (c *GetConfigCall) Fields(s ...googleapi.Field) *GetConfigCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetConfigCall) HashOnly ¶
func (c *GetConfigCall) HashOnly(hashOnly bool) *GetConfigCall
HashOnly sets the optional parameter "hash_only":
func (*GetConfigCall) Header ¶
func (c *GetConfigCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetConfigCall) IfNoneMatch ¶
func (c *GetConfigCall) IfNoneMatch(entityTag string) *GetConfigCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*GetConfigCall) Revision ¶
func (c *GetConfigCall) Revision(revision string) *GetConfigCall
Revision sets the optional parameter "revision":
type GetConfigSetsCall ¶
type GetConfigSetsCall struct {
// contains filtered or unexported fields
}
func (*GetConfigSetsCall) ConfigSet ¶
func (c *GetConfigSetsCall) ConfigSet(configSet string) *GetConfigSetsCall
ConfigSet sets the optional parameter "config_set":
func (*GetConfigSetsCall) Context ¶
func (c *GetConfigSetsCall) Context(ctx context.Context) *GetConfigSetsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetConfigSetsCall) Do ¶
func (c *GetConfigSetsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigSetsResponseMessage, error)
Do executes the "config.get_config_sets" call. Exactly one of *LuciConfigGetConfigSetsResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetConfigSetsResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetConfigSetsCall) Fields ¶
func (c *GetConfigSetsCall) Fields(s ...googleapi.Field) *GetConfigSetsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetConfigSetsCall) Header ¶
func (c *GetConfigSetsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetConfigSetsCall) IfNoneMatch ¶
func (c *GetConfigSetsCall) IfNoneMatch(entityTag string) *GetConfigSetsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*GetConfigSetsCall) IncludeFiles ¶
func (c *GetConfigSetsCall) IncludeFiles(includeFiles bool) *GetConfigSetsCall
IncludeFiles sets the optional parameter "include_files":
func (*GetConfigSetsCall) IncludeLastImportAttempt ¶
func (c *GetConfigSetsCall) IncludeLastImportAttempt(includeLastImportAttempt bool) *GetConfigSetsCall
IncludeLastImportAttempt sets the optional parameter "include_last_import_attempt":
type GetMappingCall ¶
type GetMappingCall struct {
// contains filtered or unexported fields
}
func (*GetMappingCall) ConfigSet ¶
func (c *GetMappingCall) ConfigSet(configSet string) *GetMappingCall
ConfigSet sets the optional parameter "config_set":
func (*GetMappingCall) Context ¶
func (c *GetMappingCall) Context(ctx context.Context) *GetMappingCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetMappingCall) Do ¶
func (c *GetMappingCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetMappingResponseMessage, error)
Do executes the "config.get_mapping" call. Exactly one of *LuciConfigGetMappingResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetMappingResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetMappingCall) Fields ¶
func (c *GetMappingCall) Fields(s ...googleapi.Field) *GetMappingCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetMappingCall) Header ¶
func (c *GetMappingCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetMappingCall) IfNoneMatch ¶
func (c *GetMappingCall) IfNoneMatch(entityTag string) *GetMappingCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type GetProjectConfigsCall ¶
type GetProjectConfigsCall struct {
// contains filtered or unexported fields
}
func (*GetProjectConfigsCall) Context ¶
func (c *GetProjectConfigsCall) Context(ctx context.Context) *GetProjectConfigsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetProjectConfigsCall) Do ¶
func (c *GetProjectConfigsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigMultiResponseMessage, error)
Do executes the "config.get_project_configs" call. Exactly one of *LuciConfigGetConfigMultiResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetConfigMultiResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetProjectConfigsCall) Fields ¶
func (c *GetProjectConfigsCall) Fields(s ...googleapi.Field) *GetProjectConfigsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetProjectConfigsCall) HashesOnly ¶
func (c *GetProjectConfigsCall) HashesOnly(hashesOnly bool) *GetProjectConfigsCall
HashesOnly sets the optional parameter "hashes_only":
func (*GetProjectConfigsCall) Header ¶
func (c *GetProjectConfigsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetProjectConfigsCall) IfNoneMatch ¶
func (c *GetProjectConfigsCall) IfNoneMatch(entityTag string) *GetProjectConfigsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type GetProjectsCall ¶
type GetProjectsCall struct {
// contains filtered or unexported fields
}
func (*GetProjectsCall) Context ¶
func (c *GetProjectsCall) Context(ctx context.Context) *GetProjectsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetProjectsCall) Do ¶
func (c *GetProjectsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetProjectsResponseMessage, error)
Do executes the "config.get_projects" call. Exactly one of *LuciConfigGetProjectsResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetProjectsResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetProjectsCall) Fields ¶
func (c *GetProjectsCall) Fields(s ...googleapi.Field) *GetProjectsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetProjectsCall) Header ¶
func (c *GetProjectsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetProjectsCall) IfNoneMatch ¶
func (c *GetProjectsCall) IfNoneMatch(entityTag string) *GetProjectsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type GetRefConfigsCall ¶
type GetRefConfigsCall struct {
// contains filtered or unexported fields
}
func (*GetRefConfigsCall) Context ¶
func (c *GetRefConfigsCall) Context(ctx context.Context) *GetRefConfigsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetRefConfigsCall) Do ¶
func (c *GetRefConfigsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetConfigMultiResponseMessage, error)
Do executes the "config.get_ref_configs" call. Exactly one of *LuciConfigGetConfigMultiResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetConfigMultiResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetRefConfigsCall) Fields ¶
func (c *GetRefConfigsCall) Fields(s ...googleapi.Field) *GetRefConfigsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetRefConfigsCall) HashesOnly ¶
func (c *GetRefConfigsCall) HashesOnly(hashesOnly bool) *GetRefConfigsCall
HashesOnly sets the optional parameter "hashes_only":
func (*GetRefConfigsCall) Header ¶
func (c *GetRefConfigsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetRefConfigsCall) IfNoneMatch ¶
func (c *GetRefConfigsCall) IfNoneMatch(entityTag string) *GetRefConfigsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type GetRefsCall ¶
type GetRefsCall struct {
// contains filtered or unexported fields
}
func (*GetRefsCall) Context ¶
func (c *GetRefsCall) Context(ctx context.Context) *GetRefsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*GetRefsCall) Do ¶
func (c *GetRefsCall) Do(opts ...googleapi.CallOption) (*LuciConfigGetRefsResponseMessage, error)
Do executes the "config.get_refs" call. Exactly one of *LuciConfigGetRefsResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigGetRefsResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*GetRefsCall) Fields ¶
func (c *GetRefsCall) Fields(s ...googleapi.Field) *GetRefsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*GetRefsCall) Header ¶
func (c *GetRefsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*GetRefsCall) IfNoneMatch ¶
func (c *GetRefsCall) IfNoneMatch(entityTag string) *GetRefsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type LuciConfigConfigSet ¶
type LuciConfigConfigSet struct { ConfigSet string `json:"config_set,omitempty"` // Files: Describes a file. Files []*LuciConfigFile `json:"files,omitempty"` LastImportAttempt *LuciConfigConfigSetImportAttempt `json:"last_import_attempt,omitempty"` Location string `json:"location,omitempty"` Revision *LuciConfigRevision `json:"revision,omitempty"` // ForceSendFields is a list of field names (e.g. "ConfigSet") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfigSet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
LuciConfigConfigSet: Describes a config set.
func (*LuciConfigConfigSet) MarshalJSON ¶
func (s *LuciConfigConfigSet) MarshalJSON() ([]byte, error)
type LuciConfigConfigSetImportAttempt ¶
type LuciConfigConfigSetImportAttempt struct { Message string `json:"message,omitempty"` Revision *LuciConfigRevision `json:"revision,omitempty"` Success bool `json:"success,omitempty"` Timestamp int64 `json:"timestamp,omitempty,string"` ValidationMessages []*ComponentsConfigEndpointValidationMessage `json:"validation_messages,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Message") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigConfigSetImportAttempt) MarshalJSON ¶
func (s *LuciConfigConfigSetImportAttempt) MarshalJSON() ([]byte, error)
type LuciConfigFile ¶
type LuciConfigFile struct { Path string `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Path") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
LuciConfigFile: Describes a file.
func (*LuciConfigFile) MarshalJSON ¶
func (s *LuciConfigFile) MarshalJSON() ([]byte, error)
type LuciConfigGetConfigByHashResponseMessage ¶
type LuciConfigGetConfigByHashResponseMessage struct { Content string `json:"content,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetConfigByHashResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetConfigByHashResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetConfigMultiResponseMessage ¶
type LuciConfigGetConfigMultiResponseMessage struct { Configs []*LuciConfigGetConfigMultiResponseMessageConfigEntry `json:"configs,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Configs") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Configs") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetConfigMultiResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetConfigMultiResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetConfigMultiResponseMessageConfigEntry ¶
type LuciConfigGetConfigMultiResponseMessageConfigEntry struct { ConfigSet string `json:"config_set,omitempty"` Content string `json:"content,omitempty"` ContentHash string `json:"content_hash,omitempty"` Revision string `json:"revision,omitempty"` Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "ConfigSet") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfigSet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetConfigMultiResponseMessageConfigEntry) MarshalJSON ¶
func (s *LuciConfigGetConfigMultiResponseMessageConfigEntry) MarshalJSON() ([]byte, error)
type LuciConfigGetConfigResponseMessage ¶
type LuciConfigGetConfigResponseMessage struct { Content string `json:"content,omitempty"` ContentHash string `json:"content_hash,omitempty"` Revision string `json:"revision,omitempty"` Url string `json:"url,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetConfigResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetConfigResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetConfigSetsResponseMessage ¶
type LuciConfigGetConfigSetsResponseMessage struct { // ConfigSets: Describes a config set. ConfigSets []*LuciConfigConfigSet `json:"config_sets,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "ConfigSets") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfigSets") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetConfigSetsResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetConfigSetsResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetMappingResponseMessage ¶
type LuciConfigGetMappingResponseMessage struct { Mappings []*LuciConfigGetMappingResponseMessageMapping `json:"mappings,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Mappings") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Mappings") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetMappingResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetMappingResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetMappingResponseMessageMapping ¶
type LuciConfigGetMappingResponseMessageMapping struct { ConfigSet string `json:"config_set,omitempty"` Location string `json:"location,omitempty"` // ForceSendFields is a list of field names (e.g. "ConfigSet") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfigSet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetMappingResponseMessageMapping) MarshalJSON ¶
func (s *LuciConfigGetMappingResponseMessageMapping) MarshalJSON() ([]byte, error)
type LuciConfigGetProjectsResponseMessage ¶
type LuciConfigGetProjectsResponseMessage struct { Projects []*LuciConfigProject `json:"projects,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Projects") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Projects") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetProjectsResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetProjectsResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetRefsResponseMessage ¶
type LuciConfigGetRefsResponseMessage struct { Refs []*LuciConfigGetRefsResponseMessageRef `json:"refs,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Refs") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Refs") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetRefsResponseMessage) MarshalJSON ¶
func (s *LuciConfigGetRefsResponseMessage) MarshalJSON() ([]byte, error)
type LuciConfigGetRefsResponseMessageRef ¶
type LuciConfigGetRefsResponseMessageRef struct { Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigGetRefsResponseMessageRef) MarshalJSON ¶
func (s *LuciConfigGetRefsResponseMessageRef) MarshalJSON() ([]byte, error)
type LuciConfigProject ¶
type LuciConfigProject struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` // Possible values: // "GITILES" RepoType string `json:"repo_type,omitempty"` RepoUrl string `json:"repo_url,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigProject) MarshalJSON ¶
func (s *LuciConfigProject) MarshalJSON() ([]byte, error)
type LuciConfigRevision ¶
type LuciConfigRevision struct { CommitterEmail string `json:"committer_email,omitempty"` Id string `json:"id,omitempty"` Timestamp int64 `json:"timestamp,omitempty,string"` Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "CommitterEmail") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CommitterEmail") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
func (*LuciConfigRevision) MarshalJSON ¶
func (s *LuciConfigRevision) MarshalJSON() ([]byte, error)
type LuciConfigValidateConfigRequestMessage ¶
type LuciConfigValidateConfigRequestMessage struct { ConfigSet string `json:"config_set,omitempty"` Files []*LuciConfigValidateConfigRequestMessageFile `json:"files,omitempty"` // ForceSendFields is a list of field names (e.g. "ConfigSet") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfigSet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigValidateConfigRequestMessage) MarshalJSON ¶
func (s *LuciConfigValidateConfigRequestMessage) MarshalJSON() ([]byte, error)
type LuciConfigValidateConfigRequestMessageFile ¶
type LuciConfigValidateConfigRequestMessageFile struct { Content string `json:"content,omitempty"` Path string `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigValidateConfigRequestMessageFile) MarshalJSON ¶
func (s *LuciConfigValidateConfigRequestMessageFile) MarshalJSON() ([]byte, error)
type LuciConfigValidateConfigResponseMessage ¶
type LuciConfigValidateConfigResponseMessage struct { Messages []*ComponentsConfigEndpointValidationMessage `json:"messages,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Messages") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Messages") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
func (*LuciConfigValidateConfigResponseMessage) MarshalJSON ¶
func (s *LuciConfigValidateConfigResponseMessage) MarshalJSON() ([]byte, error)
type ReimportCall ¶
type ReimportCall struct {
// contains filtered or unexported fields
}
func (*ReimportCall) Context ¶
func (c *ReimportCall) Context(ctx context.Context) *ReimportCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ReimportCall) Do ¶
func (c *ReimportCall) Do(opts ...googleapi.CallOption) error
Do executes the "config.reimport" call.
func (*ReimportCall) Fields ¶
func (c *ReimportCall) Fields(s ...googleapi.Field) *ReimportCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ReimportCall) Header ¶
func (c *ReimportCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.
func (*Service) GetConfig ¶
func (s *Service) GetConfig(configSet string, path string) *GetConfigCall
GetConfig: Gets a config file.
func (*Service) GetConfigByHash ¶
func (s *Service) GetConfigByHash(contentHash string) *GetConfigByHashCall
GetConfigByHash: Gets a config file by its hash.
func (*Service) GetConfigSets ¶
func (s *Service) GetConfigSets() *GetConfigSetsCall
GetConfigSets: Returns config sets.
func (*Service) GetMapping ¶
func (s *Service) GetMapping() *GetMappingCall
GetMapping: DEPRECATED. Use get_config_sets.
func (*Service) GetProjectConfigs ¶
func (s *Service) GetProjectConfigs(path string) *GetProjectConfigsCall
GetProjectConfigs: Gets configs in all project config sets.
func (*Service) GetProjects ¶
func (s *Service) GetProjects() *GetProjectsCall
GetProjects: Gets list of registered projects. The project list is stored in services/luci-config:projects.cfg.
func (*Service) GetRefConfigs ¶
func (s *Service) GetRefConfigs(path string) *GetRefConfigsCall
GetRefConfigs: Gets configs in all ref config sets.
func (*Service) GetRefs ¶
func (s *Service) GetRefs(projectId string) *GetRefsCall
GetRefs: Gets list of refs of a project.
func (*Service) Reimport ¶
func (s *Service) Reimport(configSet string) *ReimportCall
Reimport: Reimports a config set.
func (*Service) ValidateConfig ¶
func (s *Service) ValidateConfig(luciconfigvalidateconfigrequestmessage *LuciConfigValidateConfigRequestMessage) *ValidateConfigCall
ValidateConfig:
type ValidateConfigCall ¶
type ValidateConfigCall struct {
// contains filtered or unexported fields
}
func (*ValidateConfigCall) Context ¶
func (c *ValidateConfigCall) Context(ctx context.Context) *ValidateConfigCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ValidateConfigCall) Do ¶
func (c *ValidateConfigCall) Do(opts ...googleapi.CallOption) (*LuciConfigValidateConfigResponseMessage, error)
Do executes the "config.validate_config" call. Exactly one of *LuciConfigValidateConfigResponseMessage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LuciConfigValidateConfigResponseMessage.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ValidateConfigCall) Fields ¶
func (c *ValidateConfigCall) Fields(s ...googleapi.Field) *ValidateConfigCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ValidateConfigCall) Header ¶
func (c *ValidateConfigCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.