pub struct GoASTParser { /* private fields */ }Expand description
Go AST parser that uses go/ast to extract precise type information
Implementations§
Source§impl GoASTParser
impl GoASTParser
pub fn new() -> Self
Sourcepub async fn fetch_and_parse_repository(
&mut self,
repo_url: &str,
paths: &[&str],
) -> Result<(), ParserError>
pub async fn fetch_and_parse_repository( &mut self, repo_url: &str, paths: &[&str], ) -> Result<(), ParserError>
Fetch and parse Go source files from a repository
Sourcepub fn get_type_info(&self, qualified_name: &str) -> Option<&GoTypeInfo>
pub fn get_type_info(&self, qualified_name: &str) -> Option<&GoTypeInfo>
Get type information for a fully qualified Go type
Sourcepub fn go_type_to_nickel(
&self,
go_type_info: &GoTypeInfo,
) -> Result<Type, ParserError>
pub fn go_type_to_nickel( &self, go_type_info: &GoTypeInfo, ) -> Result<Type, ParserError>
Convert a Go type to Nickel type using precise AST information
Sourcepub async fn parse_k8s_core_types(
&mut self,
) -> Result<HashMap<String, GoTypeInfo>, ParserError>
pub async fn parse_k8s_core_types( &mut self, ) -> Result<HashMap<String, GoTypeInfo>, ParserError>
Parse specific Kubernetes types
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GoASTParser
impl !RefUnwindSafe for GoASTParser
impl Send for GoASTParser
impl Sync for GoASTParser
impl Unpin for GoASTParser
impl !UnwindSafe for GoASTParser
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