{"id":15678894,"url":"https://github.com/mockersf/concourse-resource-rs","last_synced_at":"2025-05-05T21:45:15.976Z","repository":{"id":34301233,"uuid":"175514677","full_name":"mockersf/concourse-resource-rs","owner":"mockersf","description":"Helper crate to create a Concourse resource in Rust","archived":false,"fork":false,"pushed_at":"2024-03-12T04:54:31.000Z","size":918,"stargazers_count":12,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T01:37:00.580Z","etag":null,"topics":["concourse","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mockersf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-13T23:33:04.000Z","updated_at":"2023-12-15T01:32:26.000Z","dependencies_parsed_at":"2024-10-03T16:25:23.692Z","dependency_job_id":"5e66eabc-2ffd-4266-a92a-8d6fd0a61ae6","html_url":"https://github.com/mockersf/concourse-resource-rs","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":0.06818181818181823,"last_synced_commit":"6fd55978c7ee6dc18d137153db693ef8a39fd9e9"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockersf%2Fconcourse-resource-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockersf%2Fconcourse-resource-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockersf%2Fconcourse-resource-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockersf%2Fconcourse-resource-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockersf","download_url":"https://codeload.github.com/mockersf/concourse-resource-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582290,"owners_count":21771643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concourse","rust"],"created_at":"2024-10-03T16:25:19.461Z","updated_at":"2025-05-05T21:45:15.954Z","avatar_url":"https://github.com/mockersf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concourse-resource-rs [![License: MIT](https://img.shields.io/badge/License-Apache_2.0-yellow.svg)](https://opensource.org/licenses/Apache-2.0) [![Build Status](https://travis-ci.org/mockersf/concourse-resource-rs.svg?branch=master)](https://travis-ci.org/mockersf/concourse-resource-rs) [![Realease Doc](https://docs.rs/concourse-resource/badge.svg)](https://docs.rs/concourse-resource) [![Crate](https://img.shields.io/crates/v/concourse-resource.svg)](https://crates.io/crates/concourse-resource)\n\nThe API docs for the master branch are published [here](https://mockersf.github.io/concourse-resource-rs/).\n\nHelper to create a [Concourse](https://concourse-ci.org) resource in Rust following https://concourse-ci.org/implementing-resource-types.html.\n\n## Examples\n\nSee [examples](https://github.com/mockersf/concourse-resource-rs/tree/master/examples) for more examples.\n\nThe included multi-stage Dockerfile shows how to build a minimal docker image to deploy the concourse resource. To run it:\n```\ndocker build --build-arg EXAMPLE=hello_world .\n```\n\n### Simple hello world\n\n```rust\nuse std::{fs::File, io::Write, path::Path};\n\nuse serde::{Deserialize, Serialize};\n\nuse concourse_resource::*;\n\nstruct HelloWorld {}\n\n#[derive(Serialize, Deserialize)]\nstruct Version {\n    ver: String,\n}\n\nimpl Resource for HelloWorld {\n    type Version = Version;\n\n    type Source = concourse_resource::Empty;\n\n    type InParams = concourse_resource::Empty;\n    type InMetadata = concourse_resource::Empty;\n\n    type OutParams = concourse_resource::Empty;\n    type OutMetadata = concourse_resource::Empty;\n\n    fn resource_check(_: Option\u003cSelf::Source\u003e, _: Option\u003cSelf::Version\u003e) -\u003e Vec\u003cSelf::Version\u003e {\n        vec![Self::Version {\n            ver: String::from(\"static\"),\n        }]\n    }\n\n    fn resource_in(\n        _source: Option\u003cSelf::Source\u003e,\n        _version: Self::Version,\n        _params: Option\u003cSelf::InParams\u003e,\n        output_path: \u0026str,\n    ) -\u003e Result\u003cInOutput\u003cSelf::Version, Self::InMetadata\u003e, Box\u003cdyn std::error::Error\u003e\u003e {\n        let mut path = Path::new(output_path).to_path_buf();\n        path.push(\"hello_world.txt\");\n        let mut file = File::create(path)?;\n        file.write_all(b\"hello, world!\")?;\n\n        Ok(InOutput {\n            version: Self::Version {\n                ver: String::from(\"static\"),\n            },\n            metadata: None,\n        })\n    }\n\n    fn resource_out(\n        _: Option\u003cSelf::Source\u003e,\n        _: Option\u003cSelf::OutParams\u003e,\n        _: \u0026str,\n    ) -\u003e OutOutput\u003cSelf::Version, Self::OutMetadata\u003e {\n        unimplemented!()\n    }\n}\n\ncreate_resource!(HelloWorld);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockersf%2Fconcourse-resource-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockersf%2Fconcourse-resource-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockersf%2Fconcourse-resource-rs/lists"}