pub enum McpAuthMethod {
None,
Github,
GithubOidc,
}Expand description
MCP auth method. Default is None (anonymous).
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
the anonymous default).
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. 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 moreimpl Copy for McpAuthMethod
Source§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>,
impl Eq for McpAuthMethod
Source§impl JsonSchema for McpAuthMethod
impl JsonSchema for McpAuthMethod
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 inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for McpAuthMethod
impl PartialEq for McpAuthMethod
Source§impl Serialize for McpAuthMethod
impl Serialize 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.