How to create namespace with temporal sdk?

How to create temporal namespace on temporal server using temporal golang based sdk ?
any sample code would be helpful.

Hello @tplcoder

there is an example here samples-go/temporal-fixtures/namespaces at main · temporalio/samples-go · GitHub

Let me know if it helps

@antonio.perez Thanks, How connection has been made between client and temporal server without mentioning any temporal server details on this example, what sort of authorization needed to perform this namespace creation activity ? what are the failure scenarios

@tplcoder

you can specify the host in the clientOptions internal package - go.temporal.io/sdk/internal - Go Packages , by default is localhost:7233, which is the default port when you run temporal with docker-compose or temporalite

what sort of authorization needed to perform this namespace creation activity?

As long as you can connect to the server, you should be able to perform this operation. You can restrict client access to the server by setting tls certificate in the frontend service:

@antonio.perez I checked on the Authorizer , this has be integrated with temporal server ? as a plugin , or default can we enable this on temproalite ?

Hi @tplcoder

not sure about temporalite, I think is should work in the same way, I will try to figure it out.

checkout this post: Authorization, Untrusted workflow creation and namespace authentication - #8 by SergeyBykov, I think this is similar to what you want to do.