pub enum McpAuthMethod {
None,
Github,
GithubOidc,
}Expand description
MCP auth method. Default is None (anonymous) which matches GoReleaser’s
mcp.go::Default migration code (cmp.Or(..., proto.MethodNone)).
Variants§
None
Anonymous publish — for testing or registries that allow it.
Serializes / deserializes as none.
Github
GitHub Personal Access Token exchange via /v0/auth/github-at.
Serializes / deserializes as github.
GithubOidc
GitHub Actions OIDC token exchange via /v0/auth/github-oidc.
Serializes / deserializes as github-oidc.
Implementations§
Source§impl McpAuthMethod
impl McpAuthMethod
Sourcepub fn parse(s: &str) -> Result<Self>
pub fn parse(s: &str) -> Result<Self>
Parse the auth method from its over-the-wire string form. Accepts the
three valid methods plus empty (treated as None, matching
GoReleaser’s mcp.go::Default defaulting behaviour).
Re-parsed from string AFTER template render so users can template
auth.type: "{{ if eq .Env.MODE \"ci\" }}github-oidc{{ else }}none{{ end }}".
The render-emit-reparse round-trip is the cost of supporting templated
enum values; without it, the enum would be locked at config-load time
before tera context is available. Mirrors GoReleaser
internal/pipe/mcp/mcp.go::Publish lines 72-85 where every string field
(including auth.type, which Go represents as string) is passed
through tmpl.New(ctx).ApplyAll(...) before being consumed.
Trait Implementations§
Source§impl Clone for McpAuthMethod
impl Clone for McpAuthMethod
Source§fn clone(&self) -> McpAuthMethod
fn clone(&self) -> McpAuthMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpAuthMethod
impl Debug for McpAuthMethod
Source§impl Default for McpAuthMethod
impl Default for McpAuthMethod
Source§fn default() -> McpAuthMethod
fn default() -> McpAuthMethod
Source§impl<'de> Deserialize<'de> for McpAuthMethod
impl<'de> Deserialize<'de> for McpAuthMethod
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>,
Source§impl JsonSchema for McpAuthMethod
impl JsonSchema for McpAuthMethod
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for McpAuthMethod
impl PartialEq for McpAuthMethod
Source§fn eq(&self, other: &McpAuthMethod) -> bool
fn eq(&self, other: &McpAuthMethod) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for McpAuthMethod
impl Serialize for McpAuthMethod
impl Copy for McpAuthMethod
impl Eq for McpAuthMethod
impl StructuralPartialEq for McpAuthMethod
Auto Trait Implementations§
impl Freeze for McpAuthMethod
impl RefUnwindSafe for McpAuthMethod
impl Send for McpAuthMethod
impl Sync for McpAuthMethod
impl Unpin for McpAuthMethod
impl UnsafeUnpin for McpAuthMethod
impl UnwindSafe for McpAuthMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.