pub struct RepoConfig {
pub external_registries_file: Option<String>,
pub registries: Vec<RegistryConfig>,
pub dependencies: Vec<DependencyConfig>,
pub publishes: Vec<PublishConfig>,
}Expand description
Repository-specific configuration loaded from apicurioconfig.yaml
This is the main configuration file for a project, containing:
- Registry definitions (can be merged with global registries)
- Dependencies to fetch from registries
- Publishing configuration for uploading artifacts
§Example
externalRegistriesFile: ${APICURIO_REGISTRIES_PATH:-}
registries:
- name: production
url: https://registry.example.com
auth:
type: bearer
tokenEnv: APICURIO_TOKEN
dependencies:
- name: user-service
groupId: com.example
artifactId: user-service
version: ^1.0.0
registry: production
outputPath: protos/user-service.protoFields§
§external_registries_file: Option<String>Optional path to external registries file for additional registry definitions
registries: Vec<RegistryConfig>Registry definitions specific to this repository
dependencies: Vec<DependencyConfig>Dependencies to fetch from registries
publishes: Vec<PublishConfig>Artifacts to publish to registries
Implementations§
Source§impl RepoConfig
impl RepoConfig
Sourcepub fn merge_registries(
&self,
global: GlobalConfig,
) -> Result<Vec<RegistryConfig>>
pub fn merge_registries( &self, global: GlobalConfig, ) -> Result<Vec<RegistryConfig>>
Merge global, external, and repo-local registries
Registry definitions are merged in the following order (later wins):
- Global registries from
~/.config/apicurio/registries.yaml - External registries from file specified in
externalRegistriesFile - Repository-local registries from
apicurioconfig.yaml
§Arguments
global- Global configuration containing shared registries
§Returns
Vector of merged registry configurations with duplicates resolved
§Errors
Returns error if external registries file cannot be read or parsed
Trait Implementations§
Source§impl Debug for RepoConfig
impl Debug for RepoConfig
Source§impl<'de> Deserialize<'de> for RepoConfig
impl<'de> Deserialize<'de> for RepoConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RepoConfig
impl RefUnwindSafe for RepoConfig
impl Send for RepoConfig
impl Sync for RepoConfig
impl Unpin for RepoConfig
impl UnwindSafe for RepoConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more