This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HIGHEST_BIT_MASK: u32 = 1 << 31; | |
#[repr(C)] | |
#[derive(Portable)] | |
pub struct ArchivedHeaderName { | |
// if the highest bit is unset, this is a known header index | |
// else this is 10 bits of length followed by 21 bits of relative pointer | |
inner: u32_le, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[repr(C)] | |
#[derive(Portable)] | |
struct ArchivedHttpResponse { | |
/// The body of the response. | |
body: ArchivedBox<[u8]>, | |
/// The headers of the response. | |
headers: ArchivedBox<[(ArchivedHeaderName, ArchivedBox<[u8]>)]>, | |
/// The status code of the response. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// not part of the resource - just here to describe what kind of resource this is about | |
"_description": "Resurs som delegeres i 'biter'", | |
"actions": null, | |
"subResources": { | |
"create": { | |
"type": "write", // this is an enum used to determin what kind of icon to show in the UI | |
"name": { | |
"nb": "Opprett skjema", | |
"en": "Create form" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "order-licence-plate", | |
"action": "order", | |
"resource": { | |
// urn:altinn:resouce er arvet, så den skippes | |
"urn:svv:area": "license-plates" | |
}, | |
"name": { | |
"no": "Bestill skilt", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rights": { | |
"required": [ | |
{ "...": "..." }, | |
{ "...": "..." } | |
], | |
"unwanted": [ | |
{ "...": "..." }, | |
{ "...": "..." } | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
p.uuid p_uuid, | |
p.id p_id, | |
p.party_type p_party_type, | |
p.name p_name, | |
p.person_identifier p_person_identifier, | |
p.organization_identifier p_organization_identifier, | |
p.created p_created, | |
p.updated p_updated, | |
o.unit_status p_unit_status, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
p.uuid p_uuid, | |
cp."uuid" cp_uuid, | |
co.unit_type, | |
p.id p_id, | |
p.party_type p_party_type, | |
p.name p_name, | |
p.person_identifier p_person_identifier, | |
p.organization_identifier p_organization_identifier, | |
p.created p_created, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prereq: schema foo finnes og bruker 1 har lov til aa lage tabeller der, og bruker 2 har ikke men har lov til aa lese | |
{ | |
await using var db = CreateConnection("connstr1"); | |
db.Exec("CREATE TABLE foo.bar (id INT PRIMARY KEY)"); | |
} | |
{ | |
await using var db = CreateConnection("connstr2"); | |
db.Exec("SELECT * FROM foo.bar"); // works |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CommunityToolkit.Diagnostics; | |
using System.Runtime.CompilerServices; | |
namespace Namespace; | |
internal static class EnumExtensions | |
{ | |
/// <summary> | |
/// Returns a value indicating whether the specified value has any of the specified flags set. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Creates a new <see cref="ValidationErrorInstance"/> with the specified <paramref name="descriptor"/>. | |
/// </summary> | |
/// <param name="descriptor">The <see cref="ValidationErrorDescriptor"/>.</param> | |
/// <returns>A <see cref="ValidationErrorInstance"/>.</returns> | |
public static ValidationErrorInstance Create(ValidationErrorDescriptor descriptor) => | |
new ValidationErrorInstance(descriptor, paths: [], extensions: []); | |
/// <summary> | |
/// Creates a new <see cref="ValidationErrorInstance"/> with the specified <paramref name="descriptor"/> and <paramref name="path"/>. |
NewerOlder