{"id":19998899,"url":"https://github.com/hanaasagi/ticket","last_synced_at":"2025-10-25T11:05:17.733Z","repository":{"id":57669752,"uuid":"149833520","full_name":"Hanaasagi/ticket","owner":"Hanaasagi","description":":ticket: Unique ID Generator","archived":false,"fork":false,"pushed_at":"2023-04-10T15:55:38.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T18:58:49.962Z","etag":null,"topics":["global-id","id","uid"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ticket","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hanaasagi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-22T00:59:04.000Z","updated_at":"2023-04-10T15:53:08.000Z","dependencies_parsed_at":"2022-09-26T20:40:34.632Z","dependency_job_id":null,"html_url":"https://github.com/Hanaasagi/ticket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hanaasagi/ticket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanaasagi%2Fticket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanaasagi%2Fticket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanaasagi%2Fticket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanaasagi%2Fticket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hanaasagi","download_url":"https://codeload.github.com/Hanaasagi/ticket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanaasagi%2Fticket/sbom","scorecard":{"id":61018,"data":{"date":"2025-08-11","repo":{"name":"github.com/Hanaasagi/ticket","commit":"4a2d34d81034e236cc21aaa0ba13913d24764b02"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/Hanaasagi/ticket/ci.yaml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T01:43:27.611Z","repository_id":57669752,"created_at":"2025-08-15T01:43:27.611Z","updated_at":"2025-08-15T01:43:27.611Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280943394,"owners_count":26417747,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["global-id","id","uid"],"created_at":"2024-11-13T05:09:50.041Z","updated_at":"2025-10-25T11:05:17.705Z","avatar_url":"https://github.com/Hanaasagi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ticket\n\nUnique-ID-Generator inspired by [rs/xid](https://github.com/rs/xid).\n\n[![ticket on GitHub Action][action-image]][action]\n[![ticket on crates.io][cratesio-image]][cratesio]\n[![ticket on docs.rs][docsrs-image]][docsrs]\n\n[action-image]: https://github.com/Hanaasagi/ticket/actions/workflows/ci.yaml/badge.svg\n[action]: https://github.com/Hanaasagi/ticket/actions/workflows/ci.yaml\n[cratesio-image]: https://img.shields.io/crates/v/ticket.svg\n[cratesio]: https://crates.io/crates/ticket\n[docsrs-image]: https://docs.rs/ticket/badge.svg\n[docsrs]: https://docs.rs/ticket\n\n```\n   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n  ）                                （\n---                                  ---\n  9   _____ ___ ___ _  _____ _____   7\n  6  |_   _|_ _/ __| |/ / __|_   _|  1\n  3    | |  | | (__| ' \u003c| _|  | |    6\n  8    |_| |___\\___|_|\\_\\___| |_|    5\n  0                                  2\n---                                  ---\n  )_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _（\n\n```\n\n### About Ticket\n\nThe ID generated from Ticket only occupies 12 bytes.\n\n- 4-byte from unix timestamp,\n- 3-byte from machine id,\n- 2-byte from current process id, and\n- 3-byte counter which starting with a random value.\n\n### Usage\n\nPut this in your `Cargo.toml`:\n\n```Toml\n[dependencies]\nticket = { git = \"https://github.com/Hanaasagi/ticket\" }\n```\n\nUse it like following\n\n```Rust\nextern crate ticket;\nuse ticket::{Ticketing, encode, decode};\n\n\nfn main() {\n    // create a `Ticketing` to generate ticket number.\n    let id = Ticketing::new().gen();\n\n    // using base32 encoding.\n    println!(\"{}\", id);  // \"bekcs9rrtf0263qgv5r0\"\n\n    // as 12 bytes array.\n    println!(\"{:?}\", id.as_bytes());  // [91, 168, 206, 39, 123, 235, 192, 35, 15, 80, 249, 118]\n\n    // encode and dedode\n    assert_eq!(decode(\u0026encode(id)), id);\n}\n```\n\n### License\n\n[BSD 3-Clause License](https://github.com/Hanaasagi/ticket/blob/master/LICENSE) Copyright (c) 2018, Hanaasagi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanaasagi%2Fticket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanaasagi%2Fticket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanaasagi%2Fticket/lists"}