CreateSshKey

com.worxbend.codeberg4s.users.social.CreateSshKey
See theCreateSshKey companion object
final case class CreateSshKey

What POST /user/keys needs to register an SSH key.

'''Derived from spec/swagger.v1.json's CreateKeyOption''', which declares title and key required and read_only optional. No golden capture exists — the path needs a token.

Built through CreateSshKey.of and refined with readOnly, so a value of this type is always a request the instance can act on. The constructor, apply and copy are private for that reason.

==read_only is about pushing, not about reading this object==

A read-only key may fetch but not push. It is sent only when the caller asked for it: omitting the key leaves the decision to Forgejo's default, which is a read/write key, and sending read_only: false explicitly says the same thing. The two spellings are indistinguishable to the instance, so this model carries a plain Boolean and always emits it — the alternative, an Option[Boolean] with two spellings for one meaning, buys nothing.

Value parameters

isReadOnly

whether the key may only fetch

key

the key material as git reads it, for example ssh-ed25519 AAAA… comment

title

the label the key is listed under, which the account holder chooses

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

The same request, restricted to fetching.

The same request, restricted to fetching.

Attributes

The same request, permitted to push. The instance's own default, stated explicitly.

The same request, permitted to push. The instance's own default, stated explicitly.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product